← Back to issue list

stage filter not applied to overlay content

View original Github issue

Metadata

Project
craft-parts
Number
#1362
Type
issue
State
open
Author
upils
Labels
Status: Triaged Type: Enhancement
Created
2025-10-10 14:31:39+00:00
Updated
2025-10-14 12:20:51+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description During the `STAGE` step, content from the overlay is migrated to the stage directory. The stage filter is not applied to this content. In the case of organizing content to the overlay, files from this layer cannot be filtered because: - using the `overlay` filter on the part will be ineffective (executed **before** the content is organized to the overlay) - using the `overlay` filter on a following part will remove the file from the **following** part's layer, still staging the one from the initial part. Now that `(overlay)` is a valid identifier to target the overlay, use it in the `stage` filter to prefix files to include/exclude. ### To Reproduce `python3 -mcraft_parts --partitions default --overlay-base /tmp/overlay --trace -v prime` ### part yaml ```shell parts: rootfs: plugin: nil override-build: | echo "a" > $CRAFT_PART_INSTALL/a echo "b" > $CRAFT_PART_INSTALL/b organize: '*': (overlay)/ stage: - (overlay)/a ``` ### Relevant log output ```shell N/A ```

Evaluation history

No evaluation history available.