← Back to issue list

$SNAPCRAFT_PROJECT_NAME used in a remote part expands to wrong value

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1766878
Type
issue
State
closed
Author
~lucyllewy
Labels
—
Created
Updated
Closed

Current evaluation

Remote parts feature removed from Snapcraft, making this issue moot.

Resolution: closed superseded

Reason: The remote parts feature was completely removed from Snapcraft, as confirmed by maintainers @brlin and @mr-cal. Commit 06532fe0c (PR #2304) removed remote parts support entirely.

Evaluated by: mr-cal-bot

No scores available.

Issue body

In my alsa remote part I've attempted to use $SNAPCRAFT_PROJECT_NAME to build a path to the final snap installation directory expecting it to expand to the name of the consuming snapcraft.yaml. Instead it expands to `alsa` because that's the name on the snapcraft.yaml containing the remote part. This is counter-intuitive; I expect $SNAPCRAFT_PROJECT_NAME to always be the project that snapcraft started building - i.e. the consumer of the remote part, and not the name of any remote parts included as a dependency.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b — closed superseded Remote parts feature removed from Snapcraft, making this issue moot.
stealth/space-bunny-alpha
Impact: 5
Quick Win: 0
Complexity: 95
Confidence: 99
Actionability: 15
close stale Historical remote-part variable expansion bug; remote-part loading was deprecated and removed, leaving no applicable code path.
stealth/space-bunny-alpha
Impact: 5
Quick Win: 5
Complexity: 0
Confidence: 98
Actionability: 98
close stale Remote-part project-name expansion is obsolete because Snapcraft has removed the remote-parts feature; the report can be closed.
stealth/space-bunny-alpha
Impact: 3
Quick Win: 1
Complexity: 2
Confidence: 92
Actionability: 20
close stale Remote parts expanded $SNAPCRAFT_PROJECT_NAME to the remote repo's own name, not the consuming snap. Remote-parts support was removed from Snapcraft (commit 06532fe0c, PR #2304) and a maintainer called it Won't fix.
stealth/space-bunny-alpha
Impact: 5
Quick Win: 0
Complexity: 5
Confidence: 88
Actionability: 10
close stale Remote parts expand $SNAPCRAFT_PROJECT_NAME to the part repo's own name instead of the consuming snap's name. Remote parts support was removed from Snapcraft (commit 06532fe0c, #2304), and a maintainer called it Won't fix.
qwen/qwen3.6-35b-a3b
Impact: 10
Quick Win: 6
Complexity: 20
Confidence: 85
Actionability: 80
close stale SNAPCRAFT_PROJECT_NAME expands to remote part's name instead of consumer's name in remote parts. Remote parts support has been removed from the codebase.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 16
Staleness: 88
Complexity: 55
Confidence: 55
Support Request: 15
needs triage 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.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 65
Confidence: 85
Support Request: 20
needs triage Remote part variable $SNAPCRAFT_PROJECT_NAME expands to the remote part's name instead of the consumer snap's name. Unlabelled, no maintainer comments, inactive for over two years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 20
close stale Reports counter-intuitive expansion of $SNAPCRAFT_PROJECT_NAME in remote parts. Issue has been inactive for over 8 years with no maintainer comments, labels, or assignee.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 40
Confidence: 75
Support Request: 10
close stale Remote part $SNAPCRAFT_PROJECT_NAME expands to the dependency's name instead of the consumer's. Unlabelled, no maintainer comments, inactive for over two years.

Update history

Date Change
created

Related work

  • Superseded By: canonical/snapcraft#2304 (confidence 95%)

    PR #2304 removed remote parts support entirely, making the variable expansion issue irrelevant

Related issues

Issue Project State Summary Similarity
#5491 `${SNAPCRAFT_PROJECT_VERSION}` no longer works in URLs snapcraft closed 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.
72%
#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.
72%
#1602728 Redefining elements of remote parts does not work snapcraft (launchpad) closed Fixed by merged snapcraft PR #666 (commit aee8589b3), allowing slashes in part names so remote-part subparts such as desktop/qt5 could be redefined.
70%
#1622435 snapcraft does not respect filesets of remote parts snapcraft (launchpad) closed Remote-part filesets were not resolved because plugins loaded before the project. Fixed by merged PR canonical/snapcraft#799 (commit 1a282439c), which centralized project loading so remote parts' filesets resolve.
70%