cleaning a step on a dir built with an old snapcraft doesn't mention that a full clean is needed too
Metadata
Current evaluation
Closed by merged PR #421 (commit 6ade3431), which changed the step-clean error to suggest a full clean instead of re-running the step when state is missing from an older snapcraft build dir.
Resolution: closed resolved
Reason: Maintainer kyrofa linked PR #421 ('Suggest a full clean if step clean is missing state.'), which merged as commit 6ade3431 and the issue was closed with that fix. The commit makes snapcraft tell the user to run a full clean rather than advising re-running the step, matching the requested behaviour.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I have a snap directory that I build with an old snapcraft version. When I try to clean a step it tells me:
Failed to clean step 'strip': Missing necessary state. Please run
strip again.
So, I run step again, and then try to clean the step again, getting the same error.
What the error didn't tell me is that I needed to execute a full clean before running strip again.
elopio@calchas:~/workspace/canonical/snapcraft/examples/libpipeline$ ./../../bin/snapcraft clean -s s
trip
Cleaning snapping area for libpipeline
Failed to clean step 'strip': Missing necessary state. Please run
strip again.
elopio@calchas:~/workspace/canonical/snapcraft/examples/libpipeline$ ./../../bin/snapcraft strip
Skipping pull libpipeline (already ran)
'pipelinetest' has prerequisites that need to be staged: libpipeline
Skipping pull libpipeline (already ran)
Skipping build libpipeline (already ran)
Skipping stage libpipeline (already ran)
Skipping pull pipelinetest (already ran)
Skipping build libpipeline (already ran)
'pipelinetest' has prerequisites that need to be staged: libpipeline
Skipping pull libpipeline (already ran)
Skipping build libpipeline (already ran)
Skipping stage libpipeline (already ran)
Skipping build pipelinetest (already ran)
Skipping stage libpipeline (already ran)
'pipelinetest' has prerequisites that need to be staged: libpipeline
Skipping pull libpipeline (already ran)
Skipping build libpipeline (already ran)
Skipping stage libpipeline (already ran)
Skipping stage pipelinetest (already ran)
Skipping strip libpipeline (already ran)
'pipelinetest' has prerequisites that need to be staged: libpipeline
Skipping pull libpipeline (already ran)
Skipping build libpipeline (already ran)
Skipping stage libpipeline (already ran)
Skipping strip pipelinetest (already ran)
elopio@calchas:~/workspace/canonical/snapcraft/examples/libpipeline$ ./../../bin/snapcraft clean -s strip
Cleaning snapping area for libpipeline
Failed to clean step 'strip': Missing necessary state. Please run
strip again.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Closed by merged PR #421 (commit 6ade3431), which changed the step-clean error to suggest a full clean instead of re-running the step when state is missing from an older snapcraft build dir. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/snapcraft#421 (commit 6ade3431), which recommends a full clean when per-step cleaning state is missing. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in merged PR #421 (commit 6ade3431): step-clean errors now recommend a full clean when per-step state is missing. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The error message for cleaning steps on legacy snapcraft builds was not updated to recommend a full clean first. The issue appears abandoned with no fix or follow-up provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The missing error guidance for cleaning steps on legacy snapcraft builds was not fixed. Issue appears abandoned due to age and zero comments. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The misleading error message for cleaning steps on legacy snapcraft builds was not addressed, indicating the issue was abandoned or superseded by newer versions. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. The snapcraft step-cleaning error message still fails to indicate that a full clean is required for directories built with older versions. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#421
(confidence 98%)
Merged commit 6ade3431 'Suggest a full clean if step clean is missing state.'; cited by the maintainer in the only comment on the issue.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #421 Suggest a full clean if step clean is missing state. | snapcraft | merged | Merged as commit 6ade3431: Snapcraft now suggests a full clean instead of re-running a step when per-step clean state is missing. Fixes LP: #1561328. | |
| #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. | |
| #1774021 Support automatically cleaning dirty steps | snapcraft (launchpad) | closed | Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f. | |
| #403 Added valid STEPs info to clean command | snapcraft | closed | Valid STEP help text for `snapcraft clean -s` was superseded by merged PR #423, landing as commit 28f568d99. | |
| #2145 lifecycle: automatically clean dirty steps | snapcraft | merged | Merged in canonical/snapcraft#2145 (commit d033c7d0f), adding opt-in outdated_step_action=clean to rebuild changed lifecycle steps and resolve LP #1774021. | |
| #1590811 "clean that part" advice doesn't tell you the command to use | snapcraft (launchpad) | closed | Fixed by merged snapcraft#1097 (commit edb56c9b8), which updated lifecycle output to print the command needed to clean a dirty part. | |
| #1578170 Your first snap: snapcraft clean needed before second snapcraft stage | snapcraft (launchpad) | closed | 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. | |
| #1957915 Cleaning later steps and re-pulling with snapcraft 6.0.1 | snapcraft (launchpad) | closed | Closed as stale after years of inactivity; no fix, resolving pull request, commit, or maintainer explanation was documented. | |
| #384 Support per-step clean command. | snapcraft | merged | Merged as commit 10772e569: adds a --step argument to `snapcraft clean`, cleaning of reverse dependencies, and placeholder per-step clean rules, advancing LP bug #1537786. Follow-up #401 implemented the real rules and closed the bug. | |
| #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. |