Skip to content

A build results in formatting error #887

@mborisyak

Description

@mborisyak

Dear alibuild developers,

I was using aliBuild for compiling FairShip and encountered the following error:

$ aliBuild build FairShip --config-dir shipdist/ --defaults release --always-prefer-system
Traceback (most recent call last):
  File "/home/max/opt/pyenv/versions/py3/bin/aliBuild", line 130, in <module>
    doMain(args, parser)
  File "/home/max/opt/pyenv/versions/py3/bin/aliBuild", line 83, in doMain
    doBuild(args, parser)
  File "/home/max/opt/pyenv/versions/3.10.4/envs/py3/lib/python3.10/site-packages/alibuild_helpers/build.py", line 490, in doBuild
    getPackageList(packages                = packages,
  File "/home/max/opt/pyenv/versions/3.10.4/envs/py3/lib/python3.10/site-packages/alibuild_helpers/utilities.py", line 469, in getPackageList
    requested_version = resolve_version(spec, defaults, "unavailable", "unavailable")
  File "/home/max/opt/pyenv/versions/3.10.4/envs/py3/lib/python3.10/site-packages/alibuild_helpers/utilities.py", line 126, in resolve_version
    return spec["version"] % {
TypeError: unsupported operand type(s) for %: 'float' and 'dict'

The error was provoked by the following dependency:

package: termcap
version: 1.0

It seems like the version was parsed as float.

Forcing str in alibuild_helpers/utilities.py:126 does solve the problem:

return str(spec['version']) % {
  ...
}

however, I'm not sure if it is the right way to fix the issue.

Sincerely,
Maxim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions