← Back to issue list

organize and stage keywords together mess up file conflict checking

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1663002
Type
issue
State
open
Author
~mrjogo
Labels
—
Created
Updated
Closed
—

Current evaluation

The organize/stage collision bypass is resolved: organization now occurs during build, so stage filtering and collision detection see organized paths.

Suggested action: close resolved

Reason: Kyrofa identified #1628098 as the root cause and explicitly said this defect needed fixing. PR #2047, commit be5982a1d, moved organization into the build step so collision detection accounts for organized files; current craft-parts code retains that lifecycle ordering.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 26 Complexity: 42 Confidence: 99 Actionability: 95

Issue body

The following snapcraft.yaml section gives a file conflict error ("Parts 'part1' and 'part2' have the following file paths in common which have different contents"): parts: part1: plugin: dump source: ./src1 organize: '*': opt/ stage: - -opt/commonfile.txt part2: plugin: dump source: ./src2 organize: '*': opt/ stage: - -opt/commonfile.txt However, when both stage keywords are changed to stage: - -commonfile.txt no errors are given, but commonfile.txt is copied into stage (with the later one overwriting the first). See attachment for full example.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 26
Complexity: 42
Confidence: 99
Actionability: 95
close resolved The organize/stage collision bypass is resolved: organization now occurs during build, so stage filtering and collision detection see organized paths.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 16
Complexity: 62
Confidence: 96
Actionability: 88
close resolved Organize and stage filtering can bypass cross-part collision detection, allowing differing files to overwrite each other; the organize-in-build fix is present in current craft-parts.
qwen/qwen3.6-35b-a3b
Impact: 70
Quick Win: 22
Complexity: 60
Confidence: 80
Actionability: 80
keep open File conflict detection fails when using organize and stage exclusions together, causing false positives or silent overwrites.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 18
Staleness: 95
Complexity: 55
Confidence: 55
Support Request: 10
close stale Bug: combining organize and stage keywords makes snapcraft's file-conflict check inconsistent — a conflict error appears for staged paths but not pre-organize paths, so a duplicate file overwrites. Unlabelled, no maintainer response, inactive ~9.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 55
Confidence: 85
Support Request: 10
close stale Snapcraft file conflict checking fails when combining organize and stage keywords, causing incorrect staging behavior. Unlabelled, no maintainer response, inactive for over 9 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 60
Confidence: 85
Support Request: 10
close stale Bug in snapcraft where using organize and stage directives together incorrectly triggers file conflict errors or causes silent overwrites. Unresponded to for over 9 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 10
close stale Bug report regarding file conflict checking when using organize and stage keywords in snapcraft.yaml. Issue is over 9 years old with no maintainer interaction or labels, indicating the affected version and behavior are likely obsolete.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft (launchpad)#1628098 (confidence 99%)

    The related bug was fixed by moving organize from stage to build in PR #2047, commit be5982a1d.

Related issues

No related issues found above the similarity threshold.