← Back to issue list

Files created in override-stage fail to get copied to prime

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1917897
Type
issue
State
open
Author
~racb
Labels
—
Created
Updated
Closed
—

Current evaluation

A symlink created after snapcraftctl stage in override-stage is absent from prime; a maintainer said file registration was planned, but no resolution is recorded.

Suggested action: keep open

Reason: The exact override-stage example creates usr/bin/awk after snapcraftctl stage, but the current lifecycle migrates only the contents recorded in step state and exposes no file-registration mechanism, so the defect remains valid. Sergiusens explicitly promised a mechanism for registering files added outside staging and priming, but no resolving PR, commit, or release is identified.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 12 Complexity: 65 Confidence: 87 Actionability: 85

Issue body

In override-stage I put: override-stage: | snapcraftctl stage ln -s mawk usr/bin/awk This failed to end up in prime/ and the symlink created was missing from the snap. This was an attempt to work around "stage-packages: [awk]" not putting an awk symlink into the snap. My full snapcraft.yaml if you need it is at: http://paste.ubuntu.com/p/jw3Vhhv8q5/ Expected behaviour: things I create in stage using override-stage ends up being copied to prime. Actual behaviour: things I create don't seem to get copied. I don't know if this is intended behaviour or not, but the following documentation leads me to think that this should work: https://snapcraft.io/docs/parts-lifecycle#heading--steps """ prime: copies the staged components into the priming area, to their final locations for the resulting snap. This is very similar to the stage step, but files go into the priming area instead of the staging area. The prime step exists because the staging area might still contain files that are required for the build but not for the snap. For example, if you have a part that downloads and installs a compiler, then you stage this part so other parts can use the compiler during building. You can then use the prime filter keyword to make sure that it doesn’t get copied to the priming area, so it’s not taking up space in the snap. Some extra checks are also run during this step to ensure that all dependencies are satisfied for a proper run time. If confinement was set to classic, then files will be scanned and, if needed, patched to work with this confinement mode. """ I infer that given I haven't applied a filter, everything in stage/ should end up combined into prime.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 12
Complexity: 65
Confidence: 87
Actionability: 85
keep open A symlink created after snapcraftctl stage in override-stage is absent from prime; a maintainer said file registration was planned, but no resolution is recorded.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 11
Complexity: 64
Confidence: 90
Actionability: 75
keep open Snapcraft omits files created directly by override-stage unless attributed to staged part content; a maintainer acknowledged the need for file registration, with no implementation evidenced.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 5
Complexity: 40
Confidence: 50
Actionability: 30
needs triage Files created in override-stage not copied to prime; unlabelled, no maintainer response for 5+ years
qwen/qwen3.8-27b
Impact: 40
Quick Win: 18
Staleness: 92
Complexity: 55
Confidence: 55
Support Request: 25
needs triage Reporter's override-stage creates a symlink (usr/bin/awk) that is not copied into prime/, so it's missing from the snap. No maintainer response, no labels, 0 comments; ~5.5 years old. Likely a craft-parts fileset-tracking gap for scriptlet-created files.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 25
Confidence: 85
Support Request: 15
needs triage Untriaged report that symlinks created in override-stage are not copied to prime. No maintainer response, labels, or assignee after over five years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 10
needs triage Files created in override-stage are not copied to prime during snap builds. The report is over five years old, has no maintainer comments or labels, and remains untriaged.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 25
Confidence: 85
Support Request: 30
close stale Reporter notes symlinks created in override-stage are not copied to prime, contradicting docs. Issue is 5+ years old with no maintainer response or labels.

Update history

Date Change
created

Related work

  • Related To: snapcraft#2049 (confidence 60%)

    Historical commit/PR added override-stage scriptlet support, but there is no evidence it addressed registration of files added outside managed stage/prime state.

Related issues

No related issues found above the similarity threshold.