lifecycle: don't clean priming area if the snap is being tried
Metadata
Current evaluation
Merged PR #2143, fixing snapcraft clean to preserve a priming area used by snap try and avoid requiring another snap try after re-priming.
Resolution: closed resolved
Reason: PR #2143 was merged into master as commit fa846914a. The change retains the priming directory when snap try is using it while clearing its contents, resolving LP: #1774015.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [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`?
-----
Currently, if one uses 'snap try' and then runs 'snapcraft clean', one must 'snap try' again once the snap has been re-primed. This PR fixes [LP: #1774015](https://bugs.launchpad.net/snapcraft/+bug/1774015) by being smarter about this: checking to see if the priming area is being used by 'snap try', and if so, not removing it when cleaning, just its contents. Then once the snap has been re-primed, it'll just start working again, no 'snap try' required.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2143, fixing snapcraft clean to preserve a priming area used by snap try and avoid requiring another snap try after re-priming. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2143 as commit fa846914a, preserving an active snap try priming area during clean so it resumes working after re-priming without another snap try. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Resolves LP: #1774015 by preventing snapcraft clean from removing the priming area when snap try is active. Only the area contents are cleared, allowing snaps to resume working immediately without re-running snap try. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into master. Fixes snapcraft clean by preserving the priming area when a snap is active via snap try, only clearing its contents. Resolves Launchpad bug #1774015 and eliminates the need to re-run snap try after cleaning. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1774015 Cleaning breaks tried snap | snapcraft (launchpad) | closed | Fixed by merged PR snapcore/snapcraft#2143 (commit fa846914a), preserving the priming area for tried snaps so snapcraft clean no longer breaks snap try. | |
| #1007 lifecycle: clean without parsing if possible. | snapcraft | merged | Merged in snapcraft#1007 via commit bacf75dfe, allowing full clean operations to bypass snapcraft.yaml parsing unless part-specific cleanup is required. |