Skip to content

Make sure recipe file exists before accessing it#916

Merged
ktf merged 1 commit intomasterfrom
ensure_recipe
Mar 21, 2025
Merged

Make sure recipe file exists before accessing it#916
ktf merged 1 commit intomasterfrom
ensure_recipe

Conversation

@singiamtel
Copy link
Copy Markdown
Collaborator

Looks like a regression in #897

[root@56a05890a2a6 ~]# uvx aliBuild@1.17.14 build bogus
ERROR: [Errno 2] No such file or directory: 'alidist/bogus.sh'

[root@56a05890a2a6 ~]# uvx aliBuild@1.17.15 build bogus
Traceback (most recent call last):
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 132, in <module>
    doMain(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 85, in doMain
    doBuild(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/build.py", line 490, in doBuild
    getPackageList(packages                = packages,
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 457, in getPackageList
    err, spec, recipe = parseRecipe(getRecipeReader(filename, configDir))
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 311, in getRecipeReader
    m = re.search(r'^dist:(.*)@([^@]+)$', url)
  File "/usr/lib64/python3.9/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object

Looks like a regression in #897

```bash
[root@56a05890a2a6 ~]# uvx aliBuild@1.17.14 build bogus
ERROR: [Errno 2] No such file or directory: 'alidist/bogus.sh'

[root@56a05890a2a6 ~]# uvx aliBuild@1.17.15 build bogus
Traceback (most recent call last):
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 132, in <module>
    doMain(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 85, in doMain
    doBuild(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/build.py", line 490, in doBuild
    getPackageList(packages                = packages,
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 457, in getPackageList
    err, spec, recipe = parseRecipe(getRecipeReader(filename, configDir))
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 311, in getRecipeReader
    m = re.search(r'^dist:(.*)@([^@]+)$', url)
  File "/usr/lib64/python3.9/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
```
@ktf
Copy link
Copy Markdown
Member

ktf commented Mar 21, 2025

Indeed. This probably needs fixes also in bits...

@ktf ktf merged commit 42ab2a4 into master Mar 21, 2025
11 checks passed
@ktf ktf deleted the ensure_recipe branch March 21, 2025 13:15
singiamtel added a commit that referenced this pull request Jul 1, 2025
Looks like a regression in #897

```bash
[root@56a05890a2a6 ~]# uvx aliBuild@1.17.14 build bogus
ERROR: [Errno 2] No such file or directory: 'alidist/bogus.sh'

[root@56a05890a2a6 ~]# uvx aliBuild@1.17.15 build bogus
Traceback (most recent call last):
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 132, in <module>
    doMain(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/bin/aliBuild", line 85, in doMain
    doBuild(args, parser)
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/build.py", line 490, in doBuild
    getPackageList(packages                = packages,
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 457, in getPackageList
    err, spec, recipe = parseRecipe(getRecipeReader(filename, configDir))
  File "/root/.cache/uv/archive-v0/GyJkpyQa9tPugmoKbsZ3N/lib64/python3.9/site-packages/alibuild_helpers/utilities.py", line 311, in getRecipeReader
    m = re.search(r'^dist:(.*)@([^@]+)$', url)
  File "/usr/lib64/python3.9/re.py", line 201, in search
    return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants