← Back to issue list

snapcraft.yaml needs to make all stages dirty (was: the can't add file without recreating entire package)

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1477904
Type
issue
State
closed
Author
~ories
Labels
first-steps
Created
Updated
Closed

Current evaluation

snapcraft.yaml changes now invalidate and rerun all lifecycle steps, implemented by canonical/snapcraft PRs #442–#448; final pull-stage fix landed as da1411df0.

Resolution: closed resolved

Reason: The bug was moved to canonical/snapcraft#4 and resolved through merged PRs #442, #443, #447, and #448. Commits 1a6a21831, 80de92254, 6224553ae, and da1411df0 made strip, stage, build, and pull detect snapcraft.yaml changes and rerun automatically.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I am running snapcraft assemble (qml plugin) on ted's branch lp:~ted/+junk/digitalsign while iterating over the package, I added 1 new file in ./pic.jpg and edited snapcraft.yaml accordingly: parts: qml: plugin: qml digitalsign: plugin: copy mkdirs: - bin files: digitalsign: bin/digitalsign digitalsign.qml: digitalsign.qml pic.jpg: pic.jpg snappy-metadata: meta rerunning snapcraft assemble will not pull in the new file, as it's skipping the build stage: olli@joe-XPS-12-9Q33:~/code/snappy/digitalsign$ ../../qml/bin/snapcraft assemble Skipping pull digitalsign (already ran) Skipping build digitalsign (already ran) Skipping stage digitalsign (already ran) Snapping digitalsign ... upon deleting ./snap/ ./parts/ ./stage/ the file is being pulled in: ... Building digitalsign cp --preserve=all -R digitalsign /home/olli/code/snappy/digitalsign/parts/digitalsign/install/bin/digitalsign cp --preserve=all -R digitalsign.qml /home/olli/code/snappy/digitalsign/parts/digitalsign/install/digitalsign.qml cp --preserve=all -R pic.jpg /home/olli/code/snappy/digitalsign/parts/digitalsign/install/pic.jpg ... while not critical (workaround: delete files, start over) it's imho a bad experience as it can be expected that developers will iterate over the package quite frequently, rebuilding is taking longer time and thus not desirable

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved snapcraft.yaml changes now invalidate and rerun all lifecycle steps, implemented by canonical/snapcraft PRs #442–#448; final pull-stage fix landed as da1411df0.
stealth/space-bunny-alpha — closed resolved Dirty-step detection was merged across PRs #442–#448; final PR #448 (da1411df0) made pull rerun after snapcraft.yaml changes invalidated earlier stages.
stealth/space-bunny-alpha — closed stale Closed without a recorded fix; snapcraft.yaml changes did not invalidate completed pull, build, or stage steps, so new files still required deleting build directories.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The stage dirtiness issue remains unfixed, requiring developers to manually delete build directories to trigger rebuilds after adding files.
qwen/qwen3.6-35b-a3b — — Abandoned. Snapcraft continues to skip stages when files are added, requiring manual cleanup of build directories to trigger rebuilds.
qwen/qwen3.6-35b-a3b — — Closed without resolution due to prolonged inactivity. Snapcraft skipped rebuild stages when new files were added, requiring manual deletion of build directories to trigger fresh builds. No fix was implemented.
qwen3.6-35b-a3b-mtp-q6 — — Abandoned. The stage caching bug preventing incremental builds on new files was later resolved in subsequent snapcraft releases via improved dirty-state tracking.

Update history

Date Change
created

Related work

  • Duplicate Of: canonical/snapcraft#4 (confidence 100%)

    The Launchpad report was moved to this GitHub issue, where the implementation was tracked.

  • Likely Fixed By: canonical/snapcraft#448 (confidence 100%)

    Final merged fix, commit da1411df0, detected snapcraft.yaml changes in the pull step and invalidated prior stages.

  • Likely Fixed By: canonical/snapcraft#442 (confidence 99%)

    Merged commit 1a6a21831 made the strip step rerun when the project configuration changed.

  • Likely Fixed By: canonical/snapcraft#443 (confidence 99%)

    Merged commit 80de92254 made the stage step rerun when upstream work was dirty.

  • Likely Fixed By: canonical/snapcraft#447 (confidence 99%)

    Merged commit 6224553ae made the build step rerun when upstream work was dirty.

Related issues

Issue Project State Summary Similarity
#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).
94%
#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.
81%
#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.
75%
#1983009 Snapcraft 7.1.0 fails to find stage package when cross-compiling snapcraft (launchpad) closed Fixed by canonical/snapcraft#3416 (commit 8f418e3d9), restoring core20 behavior so stage packages come from build-on repositories during cross-compilation.
71%
#1583718 snapcraft command doesn't include expected changes snapcraft (launchpad) closed Local source edits now trigger refreshed pull/build steps, fixing stale packaged files; snapcraft#2167 was merged in commit 39c4c39f1.
70%
#1873349 snapcraft sometimes generates invalid stage-packages entries in manifest.yaml snapcraft (launchpad) closed Fixed by snapcraft#3047 (commit 2e6549953), correcting install_stage_packages() output so manifest stage-packages entries are valid. The fix landed on edge; no release was affected.
70%