← Back to issue list

override-prime disables primed-stage-packages

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2097440
Type
issue
State
open
Author
~valentin.david
Labels
—
Created
Updated
Closed
—

Current evaluation

Manifest's primed-stage-packages is empty when a part uses override-prime; root cause is upstream craft-parts not tracking scriptlet-primed files. Confirmed by maintainers, still reproduces; duplicate on GitHub.

Suggested action: keep open

Reason: The report is valid and already triaged: maintainer @~ernestl pointed to a snapd-side workaround (canonical/snapd PR 15029) and @~lengau confirmed 'Same bug on GitHub: snapcraft#5552' (still open). Code inspection confirms Snapcraft only forwards craft-parts data — generate_manifest() in snapcraft/services/lifecycle.py unions self.get_primed_stage_packages() per part into models.Manifest, so the empty list originates in craft-parts (craft-parts#1122), not in snapcraft. The snap content itself is unaffected; only the SNAPCRAFT_BUILD_INFO manifest metadata is wrong, so impact stays moderate while the fix complexity is high because it requires an upstream craft-parts change rather than a local patch.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 10 Complexity: 62 Confidence: 85 Actionability: 68

Issue body

Consider the following `snapcraft.yaml` ``` name: something version: '0.1' summary: something description: something base: core24 confinement: strict parts: something: plugin: nil stage-packages: - libbrotli1 override-prime: | craftctl default ``` `SNAPCRAFT_BUILD_INFO=1 snapcraft` will generate a manifest with an empty `primed-stage-packages`. But if I remove `override-prime`, then it will work correctly.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 10
Complexity: 62
Confidence: 85
Actionability: 68
keep open Manifest's primed-stage-packages is empty when a part uses override-prime; root cause is upstream craft-parts not tracking scriptlet-primed files. Confirmed by maintainers, still reproduces; duplicate on GitHub.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 11
Complexity: 60
Confidence: 85
Actionability: 60
keep open Build-info manifest has empty primed-stage-packages when a part uses override-prime (even with only craftctl default). Root cause is craft-parts not tracking files from scriptlet steps (craft-parts#1122); still open, snapd-side workaround exists.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 11
Complexity: 45
Confidence: 75
Actionability: 55
needs triage override-prime scriptlet causes empty primed-stage-packages in manifest because craft-parts does not track file contents from scriptlet steps, so xattr-based package origin lookup finds no files. Confirmed still open via duplicate snapcraft#5552.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 14
Complexity: 55
Confidence: 95
Actionability: 90
keep open Reproducible core24 build-info manifest bug: stage packages are omitted from primed-stage-packages when override-prime calls craftctl default; the underlying defect remains blocked by craft-parts#1122.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 10
Complexity: 62
Confidence: 91
Actionability: 82
needs triage Stage packages are omitted from the build-info manifest when override-prime calls craftctl default; the reproducible Snapcraft report tracks an open upstream craft-parts tracking bug.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 22
Staleness: 85
Complexity: 55
Confidence: 65
Support Request: 15
needs triage Bug report: using override-prime in a part causes primed-stage-packages to be empty in the manifest, even when stage-packages are specified. Untriaged, 576 days old.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 80
Support Request: 10
close stale Using override-prime in a snapcraft.yaml part causes primed-stage-packages to be empty in the manifest. Unlabelled, zero comments, inactive for over 14 months.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 45
Confidence: 85
Support Request: 10
needs triage Using override-prime in snapcraft.yaml causes primed-stage-packages to be empty in the manifest. The issue is unlabelled, has zero comments, and has been inactive for approximately 17 months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 90
Support Request: 10
needs triage Using override-prime in a snapcraft part causes primed-stage-packages to be empty in the manifest, while removing it works correctly. Untriaged with no maintainer comments.

Update history

Date Change
created

Related work

  • Duplicate Of: canonical/snapcraft#5552 (confidence 90%)

    Maintainer @~lengau commented 'Same bug on GitHub: https://github.com/canonical/snapcraft/issues/5552', which remains open and is the active tracker.

  • Blocked By: craft-parts#1122 (confidence 85%)

    Snapcraft's manifest just aggregates craft-parts get_primed_stage_packages(); that tracker reports override-prime stores empty file metadata instead of tracking scriptlet-primed content, so the fix must land there.

  • Related To: snapd#15029 (confidence 60%)

    Workaround cited by @~ernestl; noted as a workaround rather than a resolution of the underlying tracking bug.

Related issues

Issue Project State Summary Similarity
#5552 `primed-stage-packages` isn't in manifest.yaml when using override-prime snapcraft open override-prime leaves primed-stage-packages empty in build manifests on core22+ because craft-parts #1122 does not track scriptlet-primed files; still reproduced on Launchpad.
88%
#1122 craft-parts doesn't track primed files when using `override-prime` craft-parts open override-prime stores empty file metadata instead of tracking scriptlet-created content, breaking primed-stage-package manifests and related Snapcraft workflows.
81%
#2002538 override-prime ignore failure on rebuild snapcraft (launchpad) open A failed override-prime step is cached as complete, letting a second build skip priming and package the snap; an exact old-version reproducer is provided, but the report remains untriaged.
72%
#1978966 Empty override-prime scriptlet is ignored when building against core22 snapcraft (launchpad) closed Empty override-prime handling was fixed in Snapcraft 7.1.1 on stable; the reporter confirmed the update resolved core22 builds.
71%