← Back to issue list

override-prime ignore failure on rebuild

View original Launchpad issue

Metadata

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

Current evaluation

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.

Suggested action: needs triage

Reason: The report provides a complete snapcraft.yaml, a two-build reproducer, and Snapcraft 7.2.9/snapd 2.58 versions, but has no labels, comments, or maintainer assessment. Current craft-parts code appears to write lifecycle state only after the step handler returns, so maintainers should verify whether this remains reproducible on a supported Snapcraft version before deciding whether any change is needed.

Evaluated by: mr-cal-bot

Impact: 52 Quick Win: 26 Complexity: 42 Confidence: 78 Actionability: 86

Issue body

When the command executed in override-prime fails, relaunching the snap build skip the prime step and mark it as already ran and create the .snap file. The expected behaviour is that it re-run the prime step. To reproduce, you need this snapcraft.yaml ``` name: my-snap-name base: core20 version: '0.1' summary: Single-line elevator pitch description: |   This is my-snap's description. grade: devel confinement: devmode parts:   my-part:     plugin: nil     override-prime: |       this_command_does_not_exist ``` Call snapcraft, it fails (expected) Call snapcraft again, it succeeds (not expected) To properly re-execute the prime step the only two solutions are: clean the build or change the override-prime script. snapd version: 2.58 snapcraft version: 7.2.9

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 52
Quick Win: 26
Complexity: 42
Confidence: 78
Actionability: 86
needs triage 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.
stealth/space-bunny-alpha
Impact: 60
Quick Win: 23
Complexity: 57
Confidence: 80
Actionability: 88
needs triage A failed override-prime is incorrectly recorded as completed, so a second Snapcraft 7.2.9 build skips priming and packages the snap. The report is reproducible but untriaged and unresolved in the available history.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 30
Staleness: 95
Complexity: 40
Confidence: 60
Support Request: 10
close stale Bug: override-prime step skipped after failure on rebuild, causing silent incorrect snap creation. Issue is 1331 days old with no maintainer engagement.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 5
needs triage Snapcraft skips the prime step and succeeds on rebuild after an override-prime failure, instead of re-running it. Issue is unlabelled, has no maintainer comments, and is over 3 years old.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 5
close stale Snapcraft skips failing override-prime step on rebuild instead of re-running it. Unlabeled, no maintainer response, inactive for ~3.5 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 75
Support Request: 5
needs triage Bug where snapcraft skips the failed override-prime step on subsequent builds instead of re-running it. Unlabelled, no maintainer response, inactive for ~3.5 years.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#2097440 (confidence 68%)

    Another open issue concerns override-prime lifecycle state, although it tracks disabled primed-stage-packages tracking rather than this failure-state bug.

Related issues

Issue Project State Summary Similarity
#2097440 override-prime disables primed-stage-packages snapcraft (launchpad) 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.
72%