← Back to issue list

Rename prepare/build/install to pre-build/build/post-build, and deprecate prepare/build/install

View original Github issue

Metadata

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

Current evaluation

Lifecycle overrides were implemented by merged PR #2002 (bbca282fa), adding override-build and snapcraftctl instead of renaming prepare, build, and install.

Resolution: closed resolved

Reason: Maintainer @kyrofa closed the roadmap by citing PR #2002, whose commit bbca282fa added the override-build scriptlet and snapcraftctl. PR #2327 later removed the legacy prepare, build, and install scriptlets.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Estimate: 1 day We currently have three scriptlets that cover the build step only: prepare, build, and install. We want scriptlets around all lifecycle steps: pull, build, stage, and prime. Note that introducing an install step is not part of this roadmap. There are some complications here that I want to point out. The stage and prime steps are completely handled by the core right now. As soon as we change that and provide the ability to override them, we must account for the possibility that files in stage will be changed from what they were in install, etc. Which means the stage dir must flow to the prime dir, which it does not do today (the file list is retrieved from stage, but the files themselves come from the parts’ install dirs). Note that the stanzas for pull and build can be completed without such a redesign.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Lifecycle overrides were implemented by merged PR #2002 (bbca282fa), adding override-build and snapcraftctl instead of renaming prepare, build, and install.
stealth/space-bunny-alpha — closed resolved Resolved by merged PR #2002 (bbca282fa), adding snapcraftctl and override-build rather than renaming build-related scriptlets.
qwen/qwen3.6-35b-a3b — — Resolved via pull request #2002 by introducing the override-build scriptlet. The proposed rename and deprecation of prepare, build, and install were superseded by this alternative implementation.
qwen/qwen3.6-35b-a3b — — Closed and resolved in PR #2002 via override-build. The original prepare, build, and install scriptlets were deprecated in favor of this new mechanism instead of a direct rename.
qwen/qwen3.6-35b-a3b — — Resolved via PR #2002. The proposed scriptlet rename and deprecation were superseded by implementing override-build instead.
qwen3.6-35b-a3b-mtp-q6 — — Resolved in PR #2002 via override-build. The proposed scriptlet renaming and deprecation was superseded by this alternative implementation.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#2002 (confidence 100%)

    Merged commit bbca282fa added snapcraftctl and the replacement override-build scriptlet.

  • Likely Fixed By: canonical/snapcraft#2327 (confidence 96%)

    Commit c6542b5f7 removed the legacy prepare, build, and install scriptlets.

Related issues

Issue Project State Summary Similarity
#1744822 poor naming conventions for scripts prepare and install snapcraft (launchpad) open Proposal to rename legacy prepare/install scripts is obsolete: current Snapcraft uses lifecycle overrides such as override-pull, override-build, and override-stage instead.
76%
#2103 package: make use of snapcraftctl snapcraft features snapcraft merged Merged in #2103 as commit 60d505347 and shipped in 2.42, replacing prepare/build/install hooks with override-pull/override-build.
70%