pluginhandler: handle removal of inconsistent files
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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%. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix preventing crashes during part cleanup when inconsistent files are manually removed. The system now ignores missing files and logs a warning instead. All tests passed with 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1405 pluginhandler: check for collisions only in existing files | snapcraft | merged | Merged to resolve Launchpad bug #1660696 by updating the pluginhandler to check for collisions only in existing files. Approved by two reviewers, the change modifies six files with 45 additions and 4 deletions. | |
| #3126 pluginhandler: allow cleaning the build step | snapcraft | merged | Merged fix resolving PluginV2 part cleanup failures caused by an improper guard in the clean_build method. Approved by reviewer, passed CI, and integrated into the codebase. |