fix: Prime content from overlay when split into partitions
Metadata
Current evaluation
Merged fix for priming overlay content when split into partitions. Replaces direct overlay reliance with stage directory and migration state. Approved by three reviewers, passed all CI checks, and resolves issue #1127.
Suggested action: —
No scores available.
Issue body
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
-----
Rework migrating content from the overlay at the PRIME step.
Due to the new feature to distribute content from the overlay to partitions, the content of the `default` stage directory may not fully reflect the content from the overlay. Consequently, the priming cannot rely on the overlay anymore.
Adopt a new approach relying on the content of the `stage` directory and the stage migration state (to get the list of files/directories coming from the overlay).
This approach is also closer to the standard way to migrate content.
Also make sure to not overwrite existing overlay migration prime state files.
Fixes https://github.com/canonical/craft-parts/issues/1127
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for priming overlay content when split into partitions. Replaces direct overlay reliance with stage directory and migration state. Approved by three reviewers, passed all CI checks, and resolves issue #1127. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged fix for priming overlay content when split into partitions. The change shifts reliance from the overlay to the stage directory and migration state, preventing overwrites and resolving issue #1127. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1617 fix: migrate overlay files before running stage or prime | craft-parts | merged | Merged fix that migrates overlay files before stage or prime steps. Resolves a state tracking bug causing priming failures with symlinks. Approved by reviewers and passed all CI checks. | |
| #1619 fix: migrate overlay files before running stage or prime (#1617) | craft-parts | merged | Merged cherry-pick of canonical/craft-parts#1617. Resolves changelog conflicts and migrates overlay files before stage or prime execution. Approved by two reviewers and merged following CI validation. | |
| #668 fix: stage and prime content in all partitions by default | craft-parts | merged | Merged after resolving issue #650 by modifying the fileset parser to stage and prime content across all partitions by default, instead of altering keyword defaults. Ambiguous partition configurations are now rejected. Merged following dependency #669. | |
| #663 fix: stage and prime content in all partitions by default | craft-parts | closed | Superseded by PR #664. The pull request was closed without merging, as the maintainer redirected the partition staging and priming implementation to a follow-up PR. | |
| #1127 Failing to prime content with overlay and partitions | craft-parts | closed | Closed and deferred to internal tracking ticket CRAFT-4600. No public fix or merge was provided. The bug involves incorrect overlay file visibility checks during partition priming causing stage migration failures. | |
| #121 overlay: migrate overlay data to stage and prime (CRAFT-468, CRAFT-82) | craft-parts | merged | Merged after two approvals and CI. Migrates overlay data to stage and prime, translates overlayfs whiteouts and opaque directories to OCI, and cleans shared areas. Collision detection is deferred. | |
| #664 fix: stage and prime content in all partitions by default | craft-parts | closed | Closed in favor of a different solution. The partition validator redesign and default stage/prime content logic was superseded by an alternative implementation. | |
| #834 fix: use partitions for stage-packages tracking | craft-parts | merged | Merged to fix issue #804. The change updates stage-package tracking to scan primed files per partition, resolving failures in common partitioned setups. Multi-partition tracking still requires deeper refactoring. Approved by three reviewers and passed CI. | |
| #667 fix: make overlay and partition features mutually exclusive | craft-parts | merged | Merged a fix enforcing mutual exclusivity between overlay and partitions features, as they are orthogonal. Approved by two reviewers, passed CI, and resolves issue #632. | |
| #1190 fix(overlay): detect conflicts between overlay and install | craft-parts | merged | 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. |