Whiteout files not properly interpreted at the root
Metadata
Current evaluation
Fixed by merged canonical/craft-parts#1161 (commit 664f356e), which correctly handles top-level .wh..wh..opq files during staging; released in craft-parts 2.18.0.
Resolution: closed resolved
Reason: PR #1161 was merged as commit 664f356e to apply top-level whiteout opaque-directory files correctly when staging content. The fix is documented in the 2.18.0 changelog.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
Overlay whiteout files are not properly interpreted when migrating overlay content to stage directories.
### To Reproduce
Define `filesystems.yaml` with:
```
filesystems:
default:
- mount: "/"
device: "(volume/pc/rootfs)"
- mount: "/boot/efi"
device: "(volume/pc/efi)"
```
Run, as root:
```
mkdir /tmp/overlay
python3 -mcraft_parts --filesystem-mounts filesystems.yaml --partitions default,volume/pc/efi,volume/pc/rootfs --overlay-base /tmp/overlay --trace -v prime
```
This will result in the following file tree where `partitions/volume/pc/efi/stage/b` should not be present.
```
partitions
└── volume
└── pc
├── efi
│ ├── overlay
│ │ ├── prime_overlay
│ │ └── stage_overlay
│ ├── parts
│ │ ├── part1
│ │ │ ├── install
│ │ │ └── layer
│ │ └── part2
│ │ ├── install
│ │ └── layer
│ ├── prime
│ │ ├── asset
│ │ ├── b
│ │ └── .wh..wh..opq
│ └── stage
│ ├── asset
│ ├── b
│ └── .wh..wh..opq
└── rootfs
├── overlay
│ ├── prime_overlay
│ └── stage_overlay
├── parts
│ ├── part1
│ │ ├── install
│ │ └── layer
│ └── part2
│ ├── install
│ └── layer
├── prime
│ ├── a
│ └── boot
│ └── efi
└── stage
├── a
└── boot
├── efi
│ └── .wh..wh..opq
└── .wh..wh..opq
```
### part yaml
```shell
parts:
part1:
plugin: nil
overlay-script: |
echo "a1" > $CRAFT_OVERLAY/a
mkdir -p $CRAFT_OVERLAY/boot/efi
echo "b1" > $CRAFT_OVERLAY/boot/efi/b
part2:
after: [part1]
plugin: nil
overlay-script: |
rm -r $CRAFT_OVERLAY/boot/efi
mkdir $CRAFT_OVERLAY/boot/efi/
echo "boot assets" > $CRAFT_OVERLAY/boot/efi/asset
echo "a2" > $CRAFT_OVERLAY/a
```
### Relevant log output
```shell
xecute: Prime part1
DEBUG:craft_parts.executor.executor:execute action part1:Action(part_name='part1', step=Step.PRIME, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
DEBUG:craft_parts.executor.part_handler:priming overlay files
DEBUG:craft_parts.state_manager.states:load overlay migration state file: /home/paul/scratch/craft-parts/overlay/stage_overlay
DEBUG:craft_parts.state_manager.states:load overlay migration state file: /home/paul/scratch/craft-parts/partitions/volume/pc/efi/overlay/stage_overlay
DEBUG:craft_parts.state_manager.states:load overlay migration state file: /home/paul/scratch/craft-parts/partitions/volume/pc/rootfs/overlay/stage_overlay
DEBUG:craft_parts.executor.part_handler:partition volume/pc/rootfs
DEBUG:craft_parts.executor.migration:filter whiteout file 'boot/.wh..wh..opq'
DEBUG:craft_parts.executor.migration:filter whiteout file 'boot/efi/.wh..wh..opq'
DEBUG:craft_parts.executor.part_handler:unlinked '/home/paul/scratch/craft-parts/partitions/volume/pc/rootfs/prime/boot/.wh..wh..opq'
DEBUG:craft_parts.executor.part_handler:unlinked '/home/paul/scratch/craft-parts/partitions/volume/pc/rootfs/prime/boot/efi/.wh..wh..opq'
Execute: Prime part2
DEBUG:craft_parts.executor.executor:execute action part2:Action(part_name='part2', step=Step.PRIME, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None))
DEBUG:craft_parts.executor.part_handler:priming overlay files
DEBUG:craft_parts.executor.part_handler:prime overlay migration state exists, not migrating overlay data for partition default
DEBUG:craft_parts.executor.part_handler:prime overlay migration state exists, not migrating overlay data for partition volume/pc/efi
DEBUG:craft_parts.executor.part_handler:prime overlay migration state exists, not migrating overlay data for partition volume/pc/rootfs
DEBUG:craft_parts.executor.part_handler:PRIME overlay migration state exists, not overwriting migrated overlay data
DEBUG:craft_parts.executor.part_handler:PRIME overlay migration state exists, not overwriting migrated overlay data
DEBUG:craft_parts.executor.part_handler:PRIME overlay migration state exists, not overwriting migrated overlay data
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged canonical/craft-parts#1161 (commit 664f356e), which correctly handles top-level .wh..wh..opq files during staging; released in craft-parts 2.18.0. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/craft-parts#1161 (commit 664f356e): root .wh..wh..opq whiteouts are now handled correctly when migrating overlay data into stage/prime directories across partitions. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/craft-parts#1161 in commit 664f356e, correcting root whiteout handling during overlay migration to stage directories. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and synced to internal Jira ticket CRAFT-4639. No public fix, merge, or resolution was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a public fix. The report was synced to internal Jira ticket CRAFT-4639 for tracking. No resolution or code changes were published. | |
| qwen/qwen3.6-35b-a3b | — | — | Triaged and closed. Transferred to internal Jira ticket CRAFT-4639 for tracking. No fix or merge was implemented. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and moved to internal tracking via Jira ticket CRAFT-4639. No public fix or resolution was provided. The bug remains abandoned in the repository. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-parts#1161
(confidence 100%)
Merged fix commit 664f356e corrected root-level whiteout interpretation during overlay migration.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1161 fix: Whiteout files not properly interpreted at the root | craft-parts | merged | Merged PR #1161 in commit 664f356e fixed root whiteout handling, cleaned whiteouts in non-default partitions, and resolved #1157/CRAFT-4639. |