many: add override-prime scriptlet
Metadata
Current evaluation
Merged after approval and passing CI checks. Adds the override-prime scriptlet and prime subcommand to snapcraftctl, resolving issue #1674.
Suggested action: —
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 Snapcraft supports override scriptlets for the pull, build, and stage steps. This PR resolves #1674 by adding one for the prime step called `override-prime` which, if specified, overrides the part's prime step. It also adds a `prime` subcommand to `snapcraftctl` to ensure developers can still complete the default prime action.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after approval and passing CI checks. Adds the override-prime scriptlet and prime subcommand to snapcraftctl, resolving issue #1674. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds the override-prime scriptlet to Snapcraft, resolving issue #1674. Includes a prime subcommand in snapcraftctl to preserve default prime behavior when overriding. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged, introducing the override-prime scriptlet to Snapcraft and resolving issue #1674. Adds a prime subcommand to snapcraftctl, allowing developers to override the prime step while retaining default functionality. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2002 many: add snapcraftctl command for scriptlets | snapcraft | merged | Merged. Adds snapcraftctl CLI for scriptlet-to-Snapcraft communication. Introduces snapcraftctl build for override-build, resolving #1675 and LP: #1751749. Approved with passing CI across 28 files. | |
| #2045 many: add override-pull scriptlet | snapcraft | merged | Merged: added override-pull scriptlet and snapcraftctl pull subcommand to Snapcraft. Enables overriding the plugin pull step for source patching. Fixed Local source handling to preserve pre-pull changes. | |
| #2049 many: add override-stage scriptlet | snapcraft | merged | Merged override-stage scriptlet, resolving issue #1673. Introduces stage step override capability and a snapcraftctl stage subcommand for default behavior. Author fixed FakeLXD test failures prior to merge. |