organize behavior is inconsistent
Metadata
Current evaluation
Closed as outdated: a maintainer noted that current Snapcraft's organize behavior has improved dramatically; no specific fixing PR or commit was cited.
Resolution: closed stale
Reason: The sole closing comment from @~mr-cal says the organize key has been improved dramatically in current Snapcraft. No resolving change, release, or backport was identified.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Something I often did with the copy plugin is say "take the contents of this source and place it in <subdir>". That looked like this:
parts:
using-copy:
plugin: copy
source: /my/tarball.tar
files:
'*': subdir/
That would then extract /my/tarball.tar and place its contents in subdir/ .
However, there's no reliable way to get the same behavior out of organize. Take this YAML for example:
name: my-snap-name
version: '0.1'
summary: my summary
description: my description
grade: devel
confinement: devmode
parts:
part1:
plugin: dump
organize:
'*': subdir/
prepare: &prepare |
mkdir -p $SNAPCRAFT_PART_INSTALL/subdir
touch $SNAPCRAFT_PART_INSTALL/file_in_root
touch $SNAPCRAFT_PART_INSTALL/subdir/file_in_subdir
part2:
plugin: dump
organize:
'*': different-subdir/
prepare: *prepare
Run `snapcraft part2` and you'll see that this works exactly the same way as the copy plugin. It takes the entire tree and places it within a new directory called `different-subdir`.
However, now run `snapcraft part1`. You'll see this doesn't work right at all. It has both `file_in_root` and `file_in_subdir` contained within `subdir/`, thus changing the tree completely. This is due to he fact that the directory into which the organize is supposed to be happening is named the same as a directory that already exists in the source.
It'd be nice if the behavior was a little more consistent, and we could get equivalent behavior from the dump plugin as from the copy plugin. As it is, for this very reason, I continue to use the copy plugin.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed as outdated: a maintainer noted that current Snapcraft's organize behavior has improved dramatically; no specific fixing PR or commit was cited. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved in current Snapcraft: a maintainer closed the report after noting that the organize key had been greatly improved. | |
| stealth/space-bunny-alpha | — | closed stale | No fix or superseding work was identified for the organize/copy inconsistency; the report was closed without an explanation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The inconsistent behavior between the copy plugin and the organize directive remains unaddressed. No fix or workaround was implemented, leaving the issue abandoned. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
50
Confidence:
85
Support Request:
10
|
close stale | Over 9-year-old report detailing inconsistent behavior between the copy and organize plugins in Snapcraft. No maintainer response or labels. Likely obsolete due to significant project evolution. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
40
Confidence:
85
Support Request:
10
|
needs triage | Inconsistent behavior between the copy plugin and organize directive when placing contents into existing directories. Issue is over nine years old, unlabelled, and has zero maintainer interaction or comments. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
50
Confidence:
85
Support Request:
10
|
close stale | Inconsistent behavior when using organize to place files in a subdirectory that already exists in the source. No maintainer response or activity in over 9 years. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1548 fix: revert organize from build | craft-parts | merged | Merged in #1548 as 56282732, reverting #1535/8e4daf5 to remove organize from build after it caused a Snapcraft regression; downstream testing confirmed the fix. |