Your first snap: snapcraft clean needed before second snapcraft stage
Metadata
Current evaluation
Fixed in canonical/snapcraft#4 by PRs #442–#448 (commits 1a6a21831, 80de92254, 6224553ae, da1411df0): snapcraft.yaml changes now dirty lifecycle steps, avoiding the required manual clean.
Resolution: closed resolved
Reason: The same stale-step failure was tracked as canonical/snapcraft#4. PRs #442–#448 made snapcraft.yaml changes invalidate lifecycle steps, so added dependencies are processed without manually cleaning.
Evaluated by: mr-cal-bot
No scores available.
Issue body
https://developer.ubuntu.com/en/snappy/build-apps/your-first-snap/
After the first snapcraft stage the docs tell you to add a dependency (fswebcam). After doing this and calling snapcraft stage again fswebcam is not downloaded, instead all steps are skipped.
Skipping pull cam (already ran)
Skipping build cam (already ran)
Skipping stage cam (already ran)
A snapcraft clean is needed before the second snapcraft stage for this to function as expected.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/snapcraft#4 by PRs #442–#448 (commits 1a6a21831, 80de92254, 6224553ae, da1411df0): snapcraft.yaml changes now dirty lifecycle steps, avoiding the required manual clean. | |
| stealth/space-bunny-alpha | — | closed not a bug | LP #1578170 closed after the first-snap tutorial added snapcraft clean before the second snapcraft stage, preventing previously completed steps from being reused. | |
| stealth/space-bunny-alpha | — | closed not a bug | Resolved by adding the missing snapcraft clean step to the first-snap tutorial, preventing later stage steps from being skipped. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved via documentation update. Added missing snapcraft clean step to the tutorial to prevent skipped build stages. Closed as fixed. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and abandoned without resolution. The issue highlights a documentation gap where the Ubuntu snap tutorial skips steps on re-runs unless snapcraft clean is run first. No fix or update was applied. | |
| qwen/qwen3.6-35b-a3b | — | — | Documentation corrected to require snapcraft clean before re-running snapcraft stage after adding dependencies. Issue closed as resolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by updating the documentation to specify running snapcraft clean before re-running stage after adding dependencies, preventing skipped build steps. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Duplicate Of:
canonical/snapcraft#4
(confidence 94%)
Tracks the same requirement that snapcraft.yaml changes must dirty lifecycle steps; fixed by PRs #442–#448.
-
Related To:
snapcraft (launchpad)#1799925
(confidence 30%)
A commenter suggested it as a duplicate, but that later issue concerns unsupported part-specific clean commands rather than lifecycle dirtying.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1477904 snapcraft.yaml needs to make all stages dirty (was: the can't add file without recreating entire package) | snapcraft (launchpad) | closed | snapcraft.yaml changes now invalidate and rerun all lifecycle steps, implemented by canonical/snapcraft PRs #442–#448; final pull-stage fix landed as da1411df0. | |
| #4 snapcraft.yaml needs to make all stages dirty (was: the can't add file without recreating entire package) | snapcraft | closed | Fixed by PRs #442–#448: snapcraft.yaml changes now dirty lifecycle steps and auto-rerun strip/stage (commits 1a6a21831, 80de92254, 6224553ae, da1411df0). | |
| #1596596 in order to clean, the snapcraft.yaml has to be valid and the parts cache up-to-date | snapcraft (launchpad) | closed | Full-workspace `snapcraft clean` no longer needs a valid snapcraft.yaml or updated parts cache. Fixed by merged snapcore/snapcraft PR #1007 (commit bacf75dfe); maintainer kyrofa pointed to it when closing LP#1596596. | |
| #1647907 When a step is dirty, snapcraft doesn't autoclean and reexecute it | snapcraft (launchpad) | closed | Automatic cleanup and rebuilding of outdated lifecycle steps was implemented in canonical/snapcraft#2145 and merged as d033c7d0f. | |
| #1007 lifecycle: clean without parsing if possible. | snapcraft | merged | Merged in snapcraft#1007 via commit bacf75dfe, allowing full clean operations to bypass snapcraft.yaml parsing unless part-specific cleanup is required. | |
| #1834319 Cleaning up output | snapcraft (launchpad) | closed | Noisy duplicate Snapcraft output was cleaned up by merged PR canonical/snapcraft#2643 (cd38acef9), with the fix released in Snapcraft 3.7.1. | |
| #1774021 Support automatically cleaning dirty steps | snapcraft (launchpad) | closed | Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f. | |
| #221 Documentation refresh. | snapcraft | merged | Merged in canonical/snapcraft#221 via 08d274af5, updating six files (+237/-183) for Snapcraft 2.0 YAML keywords and lifecycle changes. | |
| #1727445 Container destroyed on snapcraft clean -s pull | snapcraft (launchpad) | closed | Fixed by snapcraft PR #1655, which corrected clean-step handling so cleaning the pull step no longer unnecessarily destroys the build container. | |
| #1570706 Snapcraft cleanbuild command doesn't work | snapcraft (launchpad) | closed | Fixed by merged canonical/snapcraft PR #458 (f78b1e3a3), which corrected Cleanbuilder constructor arguments so snapcraft cleanbuild could initialize its container. |