← Back to issue list

Add pre-stage/stage/post-stage

View original Github issue

Metadata

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

Current evaluation

Closed without implementation or a recorded reason; later PRs #2049 and #2052 added override-stage and override-prime lifecycle scriptlets.

Resolution: closed stale

Reason: No closing comment or linked implementation was recorded, and the issue remained inactive for years. Commits c5ca9ef87 (#2049) and 15119aa7e (#2052) later added the closest functionality, but evidence does not tie them to this issue's closure.

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 stale Closed without implementation or a recorded reason; later PRs #2049 and #2052 added override-stage and override-prime lifecycle scriptlets.
stealth/space-bunny-alpha — closed resolved Lifecycle overrides were implemented via PRs #2045, #2049, and #2052, adding override-pull, override-stage, and override-prime support.
stealth/space-bunny-alpha — closed superseded Lifecycle hooks were delivered via the related roadmap: override-pull #2045, override-stage #2049, and override-prime #2052 were merged; no distinct pre-/post-stage hooks were added.
stealth/space-bunny-alpha — closed stale snapcraft#1673 was closed without implementation; stage/prime scriptlets were abandoned because stage-to-prime file-flow handling required redesign.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request to add pre-stage/stage/post-stage scriptlets was abandoned due to architectural complexities in managing file flow between stage and prime directories.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request to add pre-stage, stage, and post-stage scriptlets was abandoned due to architectural complexities in stage-to-prime file handling. No changes were merged.
qwen/qwen3.6-35b-a3b — — Closed without implementation due to inactivity and architectural complexity around stage/prime file flow. The feature request remains unaddressed.
qwen3.6-35b-a3b-mtp-q6 — — Closed without implementation. The request to add pre-stage, stage, and post-stage scriptlets was abandoned due to unresolved architectural complications regarding file flow between stage and prime directories.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#2049 (confidence 95%)

    Commit c5ca9ef87 added the override-stage scriptlet.

  • Likely Fixed By: snapcraft#2052 (confidence 90%)

    Commit 15119aa7e added the override-prime scriptlet.

  • Related To: snapcraft#2045 (confidence 75%)

    Commit 56c16cbc5 added override-pull, another lifecycle override proposed in the roadmap.

Related issues

Issue Project State Summary Similarity
#1674 Add pre-prime/prime/post-prime snapcraft closed Closed as stale without adding pre-prime/post-prime hooks. Later PRs #2049 and #2052 added override-stage and override-prime scriptlets, but not the full requested lifecycle-hook set.
78%
#1672 Add pre-pull/pull/post-pull snapcraft closed Roadmap item delivered: override-pull (#2045), override-stage (#2049), and override-prime (#2052) scriptlets were added, completing lifecycle hooks around pull/build/stage/prime.
74%
#2049 many: add override-stage scriptlet snapcraft merged Merged in PR #2049 (commit c5ca9ef8), adding override-stage and snapcraftctl stage so overridden parts can invoke the default stage action, completing #1673.
74%