← 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
Updated
Closed
—

Current evaluation

Enhancement to support '(overlay)/' prefixes in the stage filter so content organized into the overlay can be filtered during the stage step. Triaged; maintainers still debating bug vs feature, no implementation yet.

Suggested action: keep open

Reason: The issue is explicitly triaged (labels 'Status: Triaged', 'Type: Enhancement'), raised by a maintainer (upils), has a concrete reproducer (nil plugin with `organize: {'*': (overlay)/}` plus `stage: [(overlay)/a]`) and a specific proposed solution, and was accepted as valid by tigarmo ('I would consider using `(overlay)` entries to apply to contents coming from the overlay as a new feature'). No fix or closing rationale exists, so it must stay open; confidence is capped because the bug-vs-feature classification is still unresolved and upils' question about whether the `overlay` filter already works for content going into the overlay was never answered, leaving the exact scope of the change underspecified. Note: repo inspection was blocked by a tool pinning error, so I could not confirm the current staging/filtering code path.

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 13 Complexity: 47 Confidence: 70 Actionability: 64

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
stealth/space-bunny-alpha
Impact: 38
Quick Win: 13
Complexity: 47
Confidence: 70
Actionability: 64
keep open Enhancement to support '(overlay)/' prefixes in the stage filter so content organized into the overlay can be filtered during the stage step. Triaged; maintainers still debating bug vs feature, no implementation yet.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 13
Complexity: 40
Confidence: 70
Actionability: 70
keep open Enhancement to support (overlay)/ prefix in stage filter for filtering overlay content during stage step. Currently stage filter only applies to build content, not overlay content. Triaged and under discussion.
qwen/qwen3.8-27b
Impact: 50
Quick Win: 22
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.

Update history

No update history recorded yet.

Related work

  • Related To: CRAFT-4857 (confidence 90%)

    Internal Jira ticket created for this report by syncronize-issues-to-jira bot on 2025-10-10.

Related issues

Issue Project State Summary Similarity
#1365 [PROTOTYPE] stage filter applied to overlay content craft-parts closed Prototype #1365 was closed unmerged as stale; the broader stage-filter request remains open in craft-parts#1362.
72%