fix(overlay): detect conflicts between overlay and install
Metadata
Current evaluation
Merged PR #1190 fixed Stage collision detection by including overlay layer contents and added integration tests for colliding and non-colliding scenarios in commit b7455277.
Resolution: closed resolved
Reason: PR #1190 was approved with all CI checks passing and merged as commit b7455277. The change extends collision checks to overlay-enabled parts and tests both genuine and false-positive conflicts.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This commit enhances the collision detection in the Stage step to also take into account contents coming from the overlay. The standard collision detection was done by comparing the contents of the install directories for the existing parts - this behavior persists, but now we *also* take into account the contents of each overlay-enabled part's layer directory, considering the layer stack to only report collisions between items that would *actually* be staged.
To validate the implementation, this commit adds extensive integration tests for scenarios that *must* collide, plus scenarios that *must not*.
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1190 fixed Stage collision detection by including overlay layer contents and added integration tests for colliding and non-colliding scenarios in commit b7455277. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1190 as b7455277, extending Stage collision detection to include overlay-layer contents and adding integration tests for real and non-conflicting cases. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix enhancing Stage step collision detection to account for overlay contents, preventing conflicts with install directories. Includes integration tests, passed all CI checks, and received approval from three reviewers. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix enhancing Stage step collision detection to include overlay contents alongside install directories. Prevents overlay-install conflicts and adds integration tests for colliding and non-colliding scenarios. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-parts#1314
(confidence 90%)
Follow-up fix prevented false collisions for similar symlinks between overlay and install directories.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1140 Overlay contents don't conflict with regular stage files | craft-parts | closed | Overlay/install collisions are now detected. PR #1190 was merged as commit b7455277, adding overlay contents to stage conflict checks and integration tests. | |
| #1314 fix: do not collide on "similar" symlinks between overlay and install dir | craft-parts | merged | Merged PR #1314 (commit bff2fa08), fixing false collisions between equivalent absolute and relative symlinks in overlay and install directories; resolves #1293. | |
| #1617 fix: migrate overlay files before running stage or prime | craft-parts | merged | Merged #1617 as 2d81a4bd, moving overlay migration before stage/prime so build-created directories cannot shadow overlay state and break priming; regression coverage was added. | |
| #1293 Bad symlink collisions between overlay and build | craft-parts | closed | Fixed by merged PR #1314 (commit bff2fa08): equivalent absolute and relative symlinks no longer trigger false overlay/install collision errors. | |
| #592 fix: delay enabling the overlay feature | rockcraft | merged | Merged PR #592 in commit 7d5df56b delayed overlay-feature enablement until Project construction and fixed #585. | |
| #119 overlay: add overlay hash to build and stage states (CRAFT-489) | craft-parts | merged | Merged PR #119 for CRAFT-489, adding overlay hashes to build and stage states so overlay-dependent steps are correctly invalidated; merge commit af08815b. | |
| #1619 fix: migrate overlay files before running stage or prime (#1617) | craft-parts | merged | Merged as bf3615ca, cherry-picking #1617 so overlay files migrate before stage or prime, preventing build-created directories from shadowing overlay state and breaking priming. | |
| #121 overlay: migrate overlay data to stage and prime (CRAFT-468, CRAFT-82) | craft-parts | merged | Merged PR #121 as d45d7079, moving overlay data into stage/prime, translating whiteouts and opaque directories to OCI, and cleaning shared overlay data. |