← Back to issue list

Access from the build system to $SNAPCRAFT_STAGE directory when after: keyword is used in parts

View original Launchpad issue

Metadata

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

Current evaluation

Closed as stale on 2016-05-29 after 60 days without activity; no resolving PR or commit was recorded. SNAPCRAFT_STAGE was later exported globally in #757.

Resolution: closed stale

Reason: The Launchpad janitor explicitly marked the issue expired because it had no activity for 60 days. Later commit dc0b68174 exported project variables including SNAPCRAFT_STAGE, but it was not the recorded resolution for this issue.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The after: keyword in a snapcraft part is used to have one one part accessing to asset or others from another parts which has already staged its content. This is normally done through the $SNAPCRAFT_STAGE substitution which is used in snapcraft.yaml. This works well for projects having autotools or cmake build system. However, simple projects who just want to "fixup" something for snappy (and so knows it will run in snapcraft) and don't want to bring a whole build system in the project can't simply use make as "$SNAPCRAFT_STAGE" isn't exported as an env variable. I know this has been already discussed, but having for those simple fixup parts having to bring autotools or cmake is a little bit of a PITA (or using ../../../stage in the Makefile isn't great either). Can't we reconsider exporting SNAPCRAFT_STAGE as an env variable and doing this *only* in parts having the after: keyword?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed as stale on 2016-05-29 after 60 days without activity; no resolving PR or commit was recorded. SNAPCRAFT_STAGE was later exported globally in #757.
stealth/space-bunny-alpha — closed stale Closed as stale after 60 days without a fix; the author pursued the copy plugin as the practical workaround instead.
stealth/space-bunny-alpha — closed stale No change was made: the request to export $SNAPCRAFT_STAGE for parts using after: was closed without a fix or adopted workaround.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The request to export $SNAPCRAFT_STAGE as an environment variable for parts using the after: keyword was abandoned. No implementation or workaround was adopted.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The request to export SNAPCRAFT_STAGE as an environment variable for parts using the after keyword was abandoned.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The request to export SNAPCRAFT_STAGE as an environment variable for parts using the after: keyword was abandoned due to inactivity.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The request to export SNAPCRAFT_STAGE as an environment variable for parts using after was abandoned due to prolonged inactivity. No implementation or alternative was adopted.
qwen3.6-35b-a3b-mtp-q6 — — Requesting $SNAPCRAFT_STAGE export as an environment variable for parts using the after keyword was closed without resolution or comments. The feature appears abandoned with no implementation or alternative solution documented.

Update history

Date Change
created

Related work

  • Related To: snapcraft#757 (confidence 80%)

    Commit dc0b68174 exports important project variables, including SNAPCRAFT_STAGE, providing later related functionality.

  • Related To: snapcraft#270 (confidence 65%)

    Commit f3e6ecdb9 added SNAPCRAFT_STAGE support for parts, but no evidence identifies it as the closure for this issue.

Related issues

Issue Project State Summary Similarity
#270 Support $SNAPCRAFT_STAGE for parts snapcraft merged Merged in canonical/snapcraft#270 via eb033b40c, adding part-time replacement of $SNAPCRAFT_STAGE with the absolute stage-directory path.
78%
#1538688 Support referencing the stage dir from snapcraft.yaml snapcraft (launchpad) closed Implemented SNAPCRAFT_STAGE substitution for part properties and merged the fix in canonical/snapcraft#270 via eb033b40c.
74%
#1548376 docs/snapcraft-syntax.md should explicitly name the conditions under which a file is expected to end up in stage/ and snap/ snapcraft (launchpad) closed Closed as stale by the Stale bot on 2017-05-19 after 60 days without activity; no fixing PR or commit was identified.
74%
#1686484 snapcraft fails when two parts have the same file in the stage keyword snapcraft (launchpad) closed Closed as stale in August 2026 after nearly nine years without a fix; the discussion provided no confirmed workaround.
70%