states: add scriptlets to build state
Metadata
Current evaluation
Merged PR #1618 (commit 4355d3ac1) adds prepare/build/install scriptlets to the build state so changing them marks the part dirty, fixing LP bug #1672407.
Resolution: closed resolved
Reason: The PR itself was merged into snapcraft as commit 4355d3ac1 ("states: add scriptlets to build state"), tracking the prepare, build, and install scriptlets in the build state so Snapcraft re-runs the build step when any of them change; this closed LP bug #1672407 ("Adding a scriptlet doesn't mark a part as dirty").
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Currently, if one of the scriptlets (`prepare`, `build`, or `install`) changes, Snapcraft doesn't notice. This PR fixes LP: [#1672407](https://bugs.launchpad.net/snapcraft/+bug/1672407) by adding them to the build state so that if one of more of these scriptlets change, Snapcraft considers the build step dirty.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1618 (commit 4355d3ac1) adds prepare/build/install scriptlets to the build state so changing them marks the part dirty, fixing LP bug #1672407. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1618 added prepare, build, and install scriptlets to Snapcraft's build state, marking builds dirty when any scriptlet changes and fixing LP #1672407. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1618 added prepare, build, and install scriptlets to build-state tracking, so scriptlet changes mark the build step dirty and fix LP #1672407. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds prepare, build, and install scriptlets to the build state to detect modifications and mark the build step dirty, resolving Launchpad bug #1672407. Approved after minor refactoring to extract redundant logic. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds prepare, build, and install scriptlets to the build state to fix a bug where Snapcraft ignored scriptlet changes. The author split out redundant changes for clarity before merging. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
snapcraft (launchpad)#1672407
(confidence 55%)
LP bug #1672407 was the underlying bug report explicitly fixed by this PR.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1672407 Adding a scriptlet doesn't mark a part as dirty | snapcraft (launchpad) | closed | Adding/changing a prepare/build/install scriptlet left the part's build state unchanged, so the part wasn't marked dirty and its steps were skipped. Fixed by merged PR snapcore/snapcraft#1618 (commit 4355d3ac1, 'states: add scriptlets to build state'), released in snapcraft 2.35. | |
| #960 pluginhandler: install scriptlet support | snapcraft | merged | Merged PR #960 (commit eb9f74b4) added pluginhandler support for part install scriptlets, implementing LP #1649683. Follow-up merged PRs #987 and #988 added prepare/build scriptlets. |