pluginhandler: handle removal of inconsistent files
Metadata
Current evaluation
Merged PR #2450 in commit 9fdd3bdc7, making cleanup tolerate manually removed stage/prime files and warn instead of failing.
Resolution: closed resolved
Reason: PR #2450 was merged into Snapcraft. Its pluginhandler change ignores missing files during cleanup and emits a warning, resolving the inconsistency failure described in Launchpad bug 1813033.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When a part is cleaned, the system does its housekeeping by removing
all the files or directories it prepared for stage or prime. If the
user manually removes a file (say, in another part's override-prime),
we should ignore the non-existent file and issue a warning instead
of halting and catching fire.
See https://bugs.launchpad.net/snapcraft/+bug/1813033 for more details.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [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)?
- [ ] 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 tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2450 in commit 9fdd3bdc7, making cleanup tolerate manually removed stage/prime files and warn instead of failing. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2450 (commit 9fdd3bdc7) so part cleanup ignores manually deleted files and warns instead of aborting. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix that prevents crashes during part cleanup when manually removed files are encountered. The system now safely ignores missing files and issues a warning instead. Approved by reviewers and passed CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to resolve Launchpad bug #1813033. The update prevents build halts during part cleanup when files are manually removed, replacing the error with a warning. Diff coverage is 100%. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #920 pluginhandler: ensure staged files are included in the prime step. | snapcraft | merged | Merged PR #920 as commit 5a253c13a, including staged files in prime when prime uses wildcards or only exclusions and fixing missing staged artifacts. | |
| #2047 pluginhandler: organize in build instead of stage | snapcraft | merged | Merged PR #2047 moved organize handling from stage to build, fixing repeat staging and ensuring collision detection sees organized files. |