Empty override-prime scriptlet is ignored when building against core22
Metadata
Current evaluation
Empty override-prime handling was fixed in Snapcraft 7.1.1 on stable; the reporter confirmed the update resolved core22 builds.
Resolution: closed resolved
Reason: Maintainer Sergiusens confirmed that Snapcraft 7.1.1, released to stable, fixed the ignored empty override-prime scriptlet. The reporter acknowledged the fix.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When building my snaps against core20, I'm using this trick to have a part install files that can be used by other parts at build time, but not end up in the final snap:
parts:
test-part:
plugin: nil
override-build: |
# install files to $SNAPCRAFT_PART_INSTALL/
override-prime: ''
The empty override-prime scriptlet ensures that nothing is primed for this part, so the files installed in override-build do not end up in the snap.
But when converting this to core22, I'm observing that the empty override-prime scriptlet appears to be ignored, and the files installed to $CRAFT_PART_INSTALL/ do end up in the snap.
Is that intended behaviour? If so, is it documented somewhere?
This is a minimal reproducer that demonstrates the problem:
name: test-snap
base: core22
version: '0.1'
summary: test snap
description: test snap
grade: stable
confinement: strict
parts:
test-part:
plugin: nil
override-build: touch $CRAFT_PART_INSTALL/foo.bar
override-prime: ''
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Empty override-prime handling was fixed in Snapcraft 7.1.1 on stable; the reporter confirmed the update resolved core22 builds. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in Snapcraft 7.1.1 by restoring empty-scriptlet handling through craft-parts PR #242 (commit 4dd2a4a0). | |
| qwen/qwen3.8-27b | — | closed resolved | Empty override-prime scriptlets were ignored when building against core22, causing build-time files to leak into the snap. Fixed in craft-parts 7.1.1 via PR #242 (handle empty scriptlets). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/craft-parts#242 (4dd2a4a0): empty scriptlets now override default handling instead of being ignored, restoring empty override-prime behavior. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution due to inactivity. The report notes empty override-prime scriptlets are ignored in core22 builds, causing unintended file inclusion. No fix or discussion was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. The empty override-prime scriptlet behavior in core22 was addressed, restoring expected functionality where empty scriptlets correctly prevent file priming. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. The behavior where empty override-prime scriptlets were ignored in core22 was addressed and resolved under craft-1155, indicating a bug fix or documentation update. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The empty override-prime behavior in core22 remains unresolved. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
craft-parts#1155
(confidence 95%)
The craft-1155 label links the regression to its upstream craft-parts fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2052 many: add override-prime scriptlet | snapcraft | merged | Merged PR #2052 via commit 15119aa7e, adding the override-prime scriptlet and a snapcraftctl prime command for running the default prime action. | |
| #5552 `primed-stage-packages` isn't in manifest.yaml when using override-prime | snapcraft | open | override-prime leaves primed-stage-packages empty in build manifests on core22+ because craft-parts #1122 does not track scriptlet-primed files; still reproduced on Launchpad. | |
| #2097440 override-prime disables primed-stage-packages | snapcraft (launchpad) | open | Manifest's primed-stage-packages is empty when a part uses override-prime; root cause is upstream craft-parts not tracking scriptlet-primed files. Confirmed by maintainers, still reproduces; duplicate on GitHub. |