← 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
open
Author
~lucyllewy
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action: needs triage

Reason: The issue has no labels, no assignee, and zero comments — no maintainer has ever acknowledged, categorised, or responded to it, so it has not been triaged. It is a genuine bug report (not a support question) with a clear, reproducible expectation about variable expansion in remote parts, so it should not be closed as not-a-bug. Its age (~844 days) and inactivity alone are not sufficient grounds to close as stale, and I could not confirm via code inspection whether remote-part variable expansion was since changed, so a human should verify current behaviour before any close decision.

Impact: 35 Quick Win: 15.75 Staleness: 88 Complexity: 55 Confidence: 55 Support Request: 15

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.8-27b
Impact: 35
Quick Win: 15.75
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 20
close stale $SNAPCRAFT_PROJECT_NAME in remote parts expands to the remote part's name instead of the consumer project's name. Unlabelled, no maintainer response, inactive for over two years.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
73%
#1923835 $SNAPCRAFT_PROJECT_VERSION isn't working for source once set via snapcraftctl snapcraft (launchpad) closed 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.
71%