scriplets: run override-pull on update_pull
Metadata
Current evaluation
Merged fix for snapcraft losing script-generated metadata during re-runs. The change re-executes override-pull scriplets on pull step re-run, tracks the current step in the plugin handler, and adds a regression test. Approved and merged after passing CI.
Suggested action: —
No scores available.
Issue body
```
Once a project is re-run, snapcraft loses metadata generated
from scripts (i.e. snapcraftctl set-version and set-grade).
Snapcraft itself will reproduce this issue when the sources change:
```
Skipping stage bash-completion (already ran)
Skipping stage snapcraft-libs (already ran)
Skipping stage legacy-snapcraft (already ran)
Skipping stage patchelf (already ran)
Cleaning later steps and re-staging snapcraft ('build' step changed)
Skipping prime bash-completion (already ran)
Skipping prime snapcraft-libs (already ran)
Skipping prime legacy-snapcraft (already ran)
Skipping prime patchelf (already ran)
Priming snapcraft
Compiling pyc files...
Failed to generate snap metadata: 'adopt-info' refers to part 'snapcraft', but that part is lacking the 'parse-info' property.
```
- Since version information may have changed between
runs, we now re-execute the override-pull scriplets when
the pull step is re-run.
- Track current step in pluginhandler when invoking a step
inside the runner - we can use this to determine which
scriplet metadata to update once called. The previous logic
assumed that the steps were cleaned and not being re-run when
checking for metadata duplication.
- Add test to reproduce failure (and pass it!)
LP #1790651
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for snapcraft losing script-generated metadata during re-runs. The change re-executes override-pull scriplets on pull step re-run, tracks the current step in the plugin handler, and adds a regression test. Approved and merged after passing CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Fixes snapcraft losing script-generated metadata during re-runs by re-executing override-pull scriplets when the pull step restarts. Tracks current step to prevent duplication and adds a regression test. Resolves LP #1790651. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged PR #2653 fixes LP #1790651 where snapcraft loses script metadata on re-runs. The change re-executes override-pull scriplets during pull step re-runs, tracks step state, and adds a regression test. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #2283 snapcraft snap: refactor override-build into a script | snapcraft | merged | Merged refactoring that extracts override-build into a standalone script to reduce snapcraft.yaml duplication and support internal vendoring. Approved by reviewer, passed CI, and modified two files. |