stage filter not applied to overlay content
Metadata
Current evaluation
craft-parts enhancement: apply the part's stage filter to content migrated from the overlay into the stage directory, using (overlay) prefixes. Triaged by maintainers as a new feature, but no implementation or assignee after ~9 months.
Suggested action: keep open
Reason: Maintainers upils and tigarmo actively discussed and agreed on the approach on 2025-10-13: support (overlay)/ entries in the stage key to filter content migrated from the overlay into the stage dir, without changing overlay content. The issue is labelled Status: Triaged / Type: Enhancement, so it is triaged and valid, but no PR or assignee has been linked, so it should remain open for scheduling rather than be closed.
Impact:
50
Quick Win:
22.5
Staleness:
55
Complexity:
55
Confidence:
80
Support Request:
5
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
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
22.5
Staleness:
55
Complexity:
55
Confidence:
80
Support Request:
5
|
keep open | craft-parts enhancement: apply the part's stage filter to content migrated from the overlay into the stage directory, using (overlay) prefixes. Triaged by maintainers as a new feature, but no implementation or assignee after ~9 months. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
75
Complexity:
55
Confidence:
85
Support Request:
5
|
keep open | Enhancement to apply stage filters to overlay content using the (overlay) prefix. Currently triaged but inactive for ~9 months with no assignee or implementation progress. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
45
Confidence:
85
Support Request:
10
|
keep open | Enhancement to allow (overlay)/ prefix in stage filters to control content migration from overlay to stage directory. Triaged and under maintainer discussion. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
65
Complexity:
30
Confidence:
90
Support Request:
0
|
keep open | stage filter ignores overlay content during migration. Adding (overlay)/ prefix support to stage filters enables explicit inclusion or exclusion of overlay files. The approach is agreed upon. Issue is triaged and awaiting implementation. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1365 [PROTOTYPE] stage filter applied to overlay content | craft-parts | closed | Proposed stage filter for overlay content was closed as a stale prototype. The branch received no reviews, failed multiple CI checks, and was abandoned by the maintainer without merging. |