SNAPCRAFT_PART_INSTALL doesn't expand in build-environment assignments
Metadata
Current evaluation
Fixed in PR #841 (commit 6cef6c0f9) by replacing SNAPCRAFT_PART_INSTALL in part attributes with the part-specific install path.
Resolution: closed resolved
Reason: Fixed via PR #841 (commit 6cef6c0f9) which replaced SNAPCRAFT_PART_INSTALL in part attributes with the part-specific install path, resolving the expansion issue in build-environment assignments.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The following assignment doesn't work:
```yaml
parts:
_part_name_:
build-environment:
- PYTHONPATH: $SNAPCRAFT_PART_INSTALL/lib/python3.6
```
It'll expand to `/lib/python3.6` in the `override-build` scriptlet.
Refer https://forum.snapcraft.io/t/problems-with-the-parts-part-name-build-environment-property/10642 for discussion.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed in PR #841 (commit 6cef6c0f9) by replacing SNAPCRAFT_PART_INSTALL in part attributes with the part-specific install path. | |
| stealth/space-bunny-alpha |
Impact:
35
Quick Win:
22
Complexity:
25
Confidence:
96
Actionability:
85
|
close resolved | SNAPCRAFT_PART_INSTALL was not expanded in per-part build-environment assignments, producing /lib/python3.6; the behavior is covered by an earlier merged fix. | |
| stealth/space-bunny-alpha |
Impact:
43
Quick Win:
10
Complexity:
67
Confidence:
78
Actionability:
72
|
keep open | A per-part build-environment assignment using SNAPCRAFT_PART_INSTALL expands it to an empty string, leaving a root-level /lib/python3.6 path; the report remains unmaintained. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
18
Staleness:
95
Complexity:
40
Confidence:
55
Support Request:
10
|
needs triage | SNAPCRAFT_PART_INSTALL not expanded in build-environment assignments, resolving to /lib/python3.6. Open since 2018 with zero comments and no labels; no evidence the behavior changed in current craft-parts, which still emits user build-environment values verbatim. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
40
Confidence:
85
Support Request:
10
|
close stale | Bug report stating SNAPCRAFT_PART_INSTALL fails to expand correctly in build-environment YAML assignments, resolving to an incorrect path. Issue has seen no maintainer interaction or updates in over seven years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
45
Confidence:
90
Support Request:
10
|
close stale | Bug report stating $SNAPCRAFT_PART_INSTALL fails to expand in build-environment assignments, expanding to an empty path instead. Issue has been inactive for over 7 years with no maintainer response or labels. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
40
Confidence:
75
Support Request:
10
|
close stale | $SNAPCRAFT_PART_INSTALL variable expansion fails in build-environment YAML assignments, producing incorrect paths. The report has been open for over seven years with zero maintainer interaction or updates. |
Update history
| Date | Change |
|---|---|
| closed | |
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#841
(confidence 95%)
PR merged as 6cef6c0f9, replacing SNAPCRAFT_PART_INSTALL in part attributes
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1628915 SNAPCRAFT_PART_INSTALL is not being replaced when called by the build tools | snapcraft (launchpad) | closed | SNAPCRAFT_PART_INSTALL expansion in part attributes was fixed by merged canonical/snapcraft PR #841 in commit 6cef6c0f9, resolving the malformed nested install paths. | |
| #841 Replace SNAPCRAFT_PART_INSTALL in the part attributes. | snapcraft | merged | Merged as 6cef6c0f9 via canonical/snapcraft#841, replacing SNAPCRAFT_PART_INSTALL in part attributes with the part-specific install path. | |
| #1719951 SNAPCRAFT_PARTS_URI doesn't work with cleanbuild | snapcraft (launchpad) | closed | Fixed cleanbuild remote-part resolution by forwarding SNAPCRAFT_PARTS_URI into LXD; merged in snapcore/snapcraft#1585 (13ea598d5). | |
| #2534 Add SNAPCRAFT_PROJECT_DIR environment variable. | snapcraft | merged | Merged PR #2534 (commit 3d4483d6f, 'project loader: add SNAPCRAFT_PROJECT_DIR environment variable') by tonysimpson, fixing Launchpad bug 1824417; the var still ships in snapcraft/parts/lifecycle.py global environment. |