← Back to issue list

Multiple parts cannot organize to the same directory in the overlay

View original Github issue

Metadata

Project
craft-parts
Number
#1487
Type
issue
State
open
Author
lengau
Labels
Status: Triaged Type: Bug
Created
2026-03-05 20:29:50+00:00
Updated
2026-05-18 04:44:03+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description When pre-filling the overlay directory, the full directory trees from multiple parts that add to the overlay directory must be disjoint. If you try to put files into the same overlay directory from separate parts, craft-parts complains that the parent directory already exists. ### To Reproduce 1. Copy the part YAML below into `parts.yaml` 2. `mkdir /tmp/empty` 3. `sudo $(which python) -m craft_parts --verbose --overlay-base=/tmp/empty --partitions=default,other overlay` ### part yaml ```shell parts: part-a: plugin: nil override-build: | mkdir $CRAFT_PART_INSTALL/my-dir organize: '*': (overlay)/ part-b: plugin: nil override-build: | # This works mkdir -p $CRAFT_PART_INSTALL/my-other-dir/subdir # This fails. mkdir -p $CRAFT_PART_INSTALL/my-dir/subdir organize: '*': (overlay)/ ``` ### Relevant log output ```shell INFO:craft_parts.executor.executor:Installing build-packages Execute: Pull part-a Execute: Pull part-b Execute: Overlay part-a Execute: Build part-a (organize contents to overlay) unknown argument ignored: lazytime + mkdir -p /home/lengau/Work/Code/craft-parts/parts/part-a/install/my-dir/subdir-a Execute: Overlay part-b Execute: Build part-b (organize contents to overlay) unknown argument ignored: lazytime + mkdir -p /home/lengau/Work/Code/craft-parts/parts/part-b/install/my-other-dir/subdir-b + mkdir -p /home/lengau/Work/Code/craft-parts/parts/part-b/install/my-dir/subdir-b Error: Failed to organize part 'part-b': trying to organize '*' to '(overlay)/', but '(overlay)/my-dir' already exists. ```

Evaluation history

No evaluation history available.