← Back to issue list

package: make use of snapcraftctl snapcraft features

View original Github issue

Metadata

Project
snapcraft
Number
#2103
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in #2103 as commit 60d505347 and shipped in 2.42, replacing prepare/build/install hooks with override-pull/override-build.

Resolution: closed resolved

Reason: PR #2103 was merged as commit 60d505347 and shipped in Snapcraft 2.42, updating packaging to use override-pull and override-build.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Use override-pull and override-build instead of their respective prepare, build and install counterparts. Also, switch to using `snapcraftctl set-version` instead of `version: git` leveraging the version value to also `snapcraftctl set-grade`. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [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`? ----- Fixes [LP: #1758958](https://bugs.launchpad.net/snapcraft/+bug/1758958)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in #2103 as commit 60d505347 and shipped in 2.42, replacing prepare/build/install hooks with override-pull/override-build.
stealth/space-bunny-alpha — closed resolved Merged in #2103 as commit 60d505347 and shipped in 2.42: snapcraft.yaml adopted override-pull/override-build and snapcraftctl version/grade features.
qwen/qwen3.6-35b-a3b — — Merged. Replaced prepare, build, and install with override-pull and override-build. Integrated snapcraftctl set-version and set-grade to fix LP: #1758958. Changes shipped in the 2.42 release, with full version management deferred to a follow-up.
qwen3.6-35b-a3b-mtp-q6 — — Merged updates to replace legacy packaging hooks with override-pull and override-build. Adopted snapcraftctl set-version and set-grade for version management. Resolves LP: #1758958 and shipped in snapcraft 2.42.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#2230 (confidence 90%)

    Later follow-up PR that added dynamic set-version and set-grade handling discussed during this work.

Related issues

Issue Project State Summary Similarity
#2283 snapcraft snap: refactor override-build into a script snapcraft merged PR #2283 merged as commit f9592939a, moving the Snapcraft snap's override-build logic into a script to reduce snapcraft.yaml duplication ahead of self-vendoring.
77%
#2045 many: add override-pull scriptlet snapcraft merged Merged as commit 56c16cbc5: added override-pull and snapcraftctl pull; Local sources now merge into the existing directory to preserve pre-pull changes.
72%
#1894 tests: allow to overwrite the snapcraft install command snapcraft merged Merged PR #1894 as commit 596896be8, adding SNAPCRAFT_INSTALL_COMMAND so integration tests can override Snapcraft installation and skip the preceding build stage.
72%
#3317 plugin handler: properly handle snapcraftctl errors snapcraft merged Merged PR #3317 in commit 9c622ecda, making snapcraftctl exit nonzero on build/pull failures and stop override scripts after parent operation errors.
71%
#2278 snap: pull early snapcraft merged Merged #2278 (commit 7386bed80) reordered snapcraftctl execution so pull runs before set-version.
71%
#1671 Rename prepare/build/install to pre-build/build/post-build, and deprecate prepare/build/install snapcraft closed Lifecycle overrides were implemented by merged PR #2002 (bbca282fa), adding override-build and snapcraftctl instead of renaming prepare, build, and install.
70%