← Back to issue list

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

View original Github issue

Metadata

Project
snapcraft
Number
#4
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by PRs #442–#448: snapcraft.yaml changes now dirty lifecycle steps and auto-rerun strip/stage (commits 1a6a21831, 80de92254, 6224553ae, da1411df0).

Resolution: closed resolved

Reason: PR #443 (80de92254) made YAML changes clean and rerun stage, while #442 (1a6a21831) did the same for strip. PRs #447 (6224553ae) and #448 (da1411df0) completed LP #1477904 by detecting dirty build and pull steps after relevant YAML changes.

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 Launchpad Details: [#LP1477904](https://bugs.launchpad.net/bugs/1477904) Olli Ries - 2015-07-24 06:15:58 -0300

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by PRs #442–#448: snapcraft.yaml changes now dirty lifecycle steps and auto-rerun strip/stage (commits 1a6a21831, 80de92254, 6224553ae, da1411df0).
stealth/space-bunny-alpha — closed stale LP1477904 closed without a recorded fix; snapcraft.yaml changes did not invalidate prior stages, so added files were omitted until build directories were deleted.
qwen/qwen3.6-35b-a3b — — Closed without a direct fix. The maintainer noted snapcraft failed to invalidate stages when snapcraft.yaml changed, requiring an internal --force. Tracking was moved back to Launchpad, superseding this GitHub issue.
qwen/qwen3.6-35b-a3b — — Abandoned and migrated back to Launchpad. The maintainer noted snapcraft should dirty all stages when snapcraft.yaml changes, but no fix was implemented and tracking reverted to Launchpad.
qwen/qwen3.6-35b-a3b — — Closed without a documented fix. Maintainer acknowledged snapcraft fails to rebuild when snapcraft.yaml changes and should invalidate all stages upon modification. Tracking moved back to Launchpad.
qwen3.6-35b-a3b-mtp-q6 — — Superseded by Launchpad tracking. Modifying snapcraft.yaml fails to trigger stage rebuilds, requiring an internal dirty flag. Closed without resolution.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#443 (confidence 100%)

    Merged as 80de92254; automatically cleans and reruns stage when snapcraft.yaml changes.

  • Likely Fixed By: snapcraft#442 (confidence 98%)

    Merged as 1a6a21831; automatically cleans and reruns strip when relevant snapcraft.yaml data changes.

  • Likely Fixed By: snapcraft#447 (confidence 98%)

    Merged as 6224553ae; detects relevant YAML changes that make the build step dirty.

  • Likely Fixed By: snapcraft#448 (confidence 98%)

    Merged as da1411df0; detects relevant YAML changes that make the pull step dirty.

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.
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.
80%
#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.
72%
#442 Automatically re-strip if dirty. snapcraft merged Merged PR #442 (commit 1a6a21831): Snapcraft now detects YAML `snap` keyword changes and automatically cleans and re-runs the strip step instead of halting, advancing LP #1477904.
72%
#1774021 Support automatically cleaning dirty steps snapcraft (launchpad) closed Fixed by automatically cleaning dirty lifecycle steps in snapcraft PR #2145, merged as commit d033c7d0f.
70%
#432 Removed stage filters in snapcraft.yaml. charmcraft merged Merged PR #432 removed 124 lines of architecture-specific stage filters from snapcraft.yaml to fix armhf builds; merge commit: 46310912.
70%
#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%