$SNAPCRAFT_PROJECT_VERSION isn't working for source once set via snapcraftctl
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
The bug where $SNAPCRAFT_PROJECT_VERSION fails to propagate in source fields after snapcraftctl set-version was closed without resolution or comments, indicating the report was abandoned.
Suggested action: —
No scores available.
Issue body
I was trying to do something like this:
parts:
mypart:
plugin: dump
source:
- on amd64: $SNAPCRAFT_PROJECT_DIR/app/dist/mypart-${SNAPCRAFT_PROJECT_VERSION}_amd64.deb
override-pull: |
deb="$(ls $SNAPCRAFT_PROJECT_DIR/app/dist/mypart-*.deb)"
snapcraftctl set-version "$(basename "$deb" | grep -Eo "[0-9]+.[0-9]+.[0-9]+")"
snapcraftctl pull
Hoping that at the pull phase the version was now set and so could be used in the source, but looks like it's unset at this level, and not propagated around when set via set-version.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | The bug where $SNAPCRAFT_PROJECT_VERSION fails to propagate in source fields after snapcraftctl set-version was closed without resolution or comments, indicating the report was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Setting SNAPCRAFT_PROJECT_VERSION via snapcraftctl set-version fails to propagate to the source field during the pull phase. Closed with no comments or resolution. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or resolution, likely abandoned. The reported $SNAPCRAFT_PROJECT_VERSION propagation bug remains unfixed. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4231 SNAPCRAFT_PROJECT_VERSION is empty if not explicitly set at top level | snapcraft | closed | Closed without a code fix. Maintainers explained dynamic environment variables are unsupported, and documentation was updated to clarify that SNAPCRAFT_PROJECT_VERSION only reflects statically set versions. | |
| #4702 [craft-application/core24] $SNAPCRAFT_PROJECT_VERSION and other fields not replaced | snapcraft | closed | Resolved via PR #4757. The core24 variable replacement failure was fixed, though CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION remain unevaluated and are tracked separately in craft-application#320. | |
| #5491 `${SNAPCRAFT_PROJECT_VERSION}` no longer works in URLs | snapcraft | closed | Regression in Snapcraft 8.9 broke SNAPCRAFT_PROJECT_VERSION and SNAPCRAFT_PROJECT_NAME in URLs. Fixed in Snapcraft 8.9.2 and released to latest/stable and 8.x/stable channels. | |
| #1766878 $SNAPCRAFT_PROJECT_NAME used in a remote part expands to wrong value | snapcraft (launchpad) | open | Bug report: $SNAPCRAFT_PROJECT_NAME in a remote part expands to the remote part's own name (e.g. alsa) instead of the consuming snap's name. Unlabelled, zero comments, no maintainer interaction, inactive ~2.3 years. | |
| #773 parser - Handle project name and version variables | snapcraft | merged | Merged. Replaces $SNAPCRAFT_PROJECT_VERSION and $SNAPCRAFT_PROJECT_NAME with values from the origin snapcraft.yaml in remote parts, addressing LP:#1619418. Changes span 4 files with 86 additions and 27 deletions. |