← Back to issue list

`${SNAPCRAFT_PROJECT_VERSION}` no longer works in URLs

View original Github issue

Metadata

Project
snapcraft
Number
#5491
Type
issue
State
closed
Author
Mailaender
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Regression in Snapcraft 8.9 broke ${SNAPCRAFT_PROJECT_VERSION} (and _NAME) expansion in part sources. Fixed by merged PR #5499 ("fix: evaluate variables in project file", commit abd5db829) and shipped in Snapcraft 8.9.2; issue closed after release announcement by mr-cal.

Resolution: closed resolved

Reason: Maintainer mr-cal reproduced the regression from Snapcraft 8.9 and closed the report after merging canonical/snapcraft#5499 (commit abd5db829), which restores project variable evaluation; the fix was released in Snapcraft 8.9.2 to latest/stable and 8.x/stable.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description https://github.com/OpenChrom/openchrom-snap/actions/runs/15069778758/job/42362912240 ### To Reproduce https://github.com/OpenChrom/openchrom-snap/tree/8789bf7804dda4d944f760a4af12de611d2929ef ### Environment Use https://github.com/snapcore/action-build ### snapcraft.yaml ```yaml name: openchrom base: core24 version: 1.5.10 summary: Visualization and Analysis of mass spectrometric and chromatographic data. description: OpenChrom® is an Open Source tool for the analysis and visualization of mass spectrometric and chromatographic data developed by Lablicate GmbH. grade: stable confinement: strict platforms: amd64: null arm64: null apps: openchrom: extensions: - gnome command: bin/openchrom-wrapper plugs: - browser-support - home - password-manager-service - mount-observe - network - network-bind - removable-media - x11 - dot-eclipse-org-eclipse-swtchart-extensions - dot-openchrom parts: openchrom: plugin: dump source: - on amd64: https://products.lablicate.com/openchrom/${SNAPCRAFT_PROJECT_VERSION}/openchrom-lablicate_linux.x86_64_${SNAPCRAFT_PROJECT_VERSION}.tar.gz - on arm64: https://products.lablicate.com/openchrom/${SNAPCRAFT_PROJECT_VERSION}/openchrom-lablicate_linux.aarch64_${SNAPCRAFT_PROJECT_VERSION}.tar.gz override-build: | craftctl default sed -i 's;@user.home/;@user.home/snap/openchrom/current/;' $SNAPCRAFT_PART_INSTALL/openchrom.ini stage-packages: - libgtk-3-0 - libusb-1.0-0 - libwebkit2gtk-4.1-0 - libsecret-1-0 - librsvg2-common override-prime: | craftctl default rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/aix*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/darwin*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/dragonflybsd*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/freebsd*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/openbsd*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/sunos*/ rm -r $SNAPCRAFT_PRIME/plugins/com.sun.jna_*v*/com/sun/jna/win32*/ wrappers: plugin: dump source: snap/local/wrappers organize: openchrom: bin/openchrom-wrapper plugs: dot-eclipse-org-eclipse-swtchart-extensions: interface: personal-files write: - $HOME/.eclipse/org.eclipse.swtchart.extensions dot-openchrom: interface: personal-files write: - $HOME/.openchrom lint: ignore: - library: - plugins/**/*.so - features/*/jre/*/lib/*.so - usr/lib/**/*.so* ``` ### Relevant log output ```shell Cannot process request (Forbidden: 403): https://products.lablicate.com/openchrom/${SNAPCRAFT_PROJECT_VERSION}/openchrom-lablicate_linux.x86_64_${SNAPCRAFT_PROJECT_VERSION}.tar.gz ``` ### Additional context If this is on purpose then you need to update https://snapcraft.io/docs/parts-environment-variables

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Regression in Snapcraft 8.9 broke ${SNAPCRAFT_PROJECT_VERSION} (and _NAME) expansion in part sources. Fixed by merged PR #5499 ("fix: evaluate variables in project file", commit abd5db829) and shipped in Snapcraft 8.9.2; issue closed after release announcement by mr-cal.
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 8.9.2, restoring ${SNAPCRAFT_PROJECT_VERSION} and ${SNAPCRAFT_PROJECT_NAME} substitution after an 8.9 regression.
stealth/space-bunny-alpha — closed resolved Fixed in Snapcraft 8.9.2, restoring SNAPCRAFT_PROJECT_VERSION and SNAPCRAFT_PROJECT_NAME expansion in URLs after a Snapcraft 8.9 regression.
qwen/qwen3.6-35b-a3b — — 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.
qwen/qwen3.6-35b-a3b — — Regression in Snapcraft 8.9 broke SNAPCRAFT_PROJECT_VERSION expansion in URLs. The bug was fixed in Snapcraft 8.9.2 and released to latest/stable and 8.x/stable channels.
qwen3.6-35b-a3b-mtp-q6 — — Regression in Snapcraft 8.9 broke SNAPCRAFT_PROJECT_VERSION expansion in URLs. Fixed in Snapcraft 8.9.2 and released to latest/stable and 8.x/stable channels.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5499 (confidence 98%)

    PR titled "fix: evaluate variables in project file", merged as commit abd5db829 and released in Snapcraft 8.9.2 per release notes and maintainer comments.

  • Related To: snapcraft#5499 (confidence 90%)

    Same pull request in canonical/snapcraft that resolved the issue.

Related issues

Issue Project State Summary Similarity
#773 parser - Handle project name and version variables snapcraft merged Merged PR #773 (commit 362d6a5f5) added substitution of SNAPCRAFT_PROJECT_NAME and SNAPCRAFT_PROJECT_VERSION in remote parts using the origin snapcraft.yaml.
74%
#5499 fix: evaluate variables in project file snapcraft merged Merged in canonical/snapcraft#5499 (commit abd5db829), restoring project-variable expansion and fixing #5491 in Snapcraft 8.9.2.
74%
#1619418 parser needs to replace project level variables snapcraft (launchpad) closed Parser-side substitution of SNAPCRAFT_PROJECT_NAME/VERSION landed via merged PR snapcore/snapcraft#773 (commit 362d6a5f5), closing the Launchpad bug that requested it.
74%
#4702 [craft-application/core24] $SNAPCRAFT_PROJECT_VERSION and other fields not replaced snapcraft closed Core24 project-variable replacement was fixed by merged PR #4757 (commit 27957515c). Remaining CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION handling was tracked in craft-application#320.
74%
#1746633 Variable substitution in snapcraft.yaml extension snapcraft (launchpad) closed Support for ${SNAPCRAFT_PROJECT_NAME} and ${SNAPCRAFT_PROJECT_VERSION} was fixed in Snapcraft 2.42.1; the reporter confirmed the fix.
72%
#4231 SNAPCRAFT_PROJECT_VERSION is empty if not explicitly set at top level snapcraft closed Closed as intended static behavior: Snapcraft does not dynamically refresh project variables, and the part-environment documentation was clarified on 2023-08-11.
72%
#1766878 $SNAPCRAFT_PROJECT_NAME used in a remote part expands to wrong value snapcraft (launchpad) closed Remote parts feature removed from Snapcraft, making this issue moot.
72%
#1923835 $SNAPCRAFT_PROJECT_VERSION isn't working for source once set via snapcraftctl snapcraft (launchpad) closed Closed as expected behavior: SNAPCRAFT_PROJECT_VERSION reflects snapcraft.yaml metadata and is not updated for the current environment by set-version.
71%