← Back to issue list

Automatically re-strip if dirty.

View original Github issue

Metadata

Project
snapcraft
Number
#442
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: The PR was merged by maintainer kyrofa as commit 1a6a21831 after review by elopio and sergiusens (approval and retest), landing the dirty-state detection for the strip step.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Currently Snapcraft doesn't notice YAML changes if a given step has already run-- it simply says that it already ran and halts execution. This PR makes progress on LP: [#1477904](https://bugs.launchpad.net/snapcraft/+bug/1477904) by changing that for the strip step, where now if one changes the `snap` keyword in the YAML, strip will notice that it's out of date and automatically clean itself and re-run.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Merged in #442, commit 1a6a21831: Snapcraft now detects changes to the snap keyword and automatically cleans and re-runs the strip step.
qwen/qwen3.6-35b-a3b — — Merged. Automatically re-runs the strip step when the snapcraft.yaml snap keyword changes. Detects dirty state via YAML property comparison, cleans, and re-executes. Resolves Launchpad bug #1477904. Documentation added during review.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Automatically re-runs the strip step when the snap keyword in snapcraft.yaml changes. Detects dirty state by comparing saved YAML properties, resolving LP #1477904. Documentation updated per review.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#443 (confidence 95%)

    Follow-on PR 80de92254 extended the same dirty detection to the stage step.

  • Related To: snapcraft#2145 (confidence 80%)

    Later generalized the mechanism with opt-in outdated_step_action=clean (d033c7d0f) for LP #1774021.

  • Related To: snapcraft#450 (confidence 70%)

    PR ab27f5587 extended dirty state to target architecture changes for pull/build.

Related issues

Issue Project State Summary Similarity
#443 Automatically re-stage if dirty. snapcraft merged Merged PR #443 in commit 80de92254, adding dirty detection so YAML changes clean and rerun stage and its dependent strip step, advancing LP #1477904.
75%
#448 Detect dirty pull step. snapcraft merged Merged dirty pull-step detection in snapcraft#448 (commit da1411df0), completing LP #1477904 by flagging pull-related YAML changes for explicit cleaning.
72%
#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).
72%
#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.
71%
#2152 many: automatically redo step for specified part snapcraft merged Merged as commit 9d1407a85 in snapcore/snapcraft. Specifying a part on the command line now cleans and re-runs that part's lifecycle step instead of skipping already-completed steps, fixing LP bug #1774260.
70%