← Back to issue list

Confusing error message for "organize" when source refers to multiples items and destination doesn't end up with /

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1663233
Type
issue
State
open
Author
~didrocks
Labels
amd64 apport-bug bitesize xenial
Created
Updated
Closed
—

Current evaluation

Wildcard organize mappings can produce a misleading "foo already exists" collision for multiple matches without a trailing slash; the report remains open with a likely glob-support fix candidate.

Suggested action: keep open

Reason: The body gives a concrete reproducer (`organize: {'*': foo}`) and explains that the second glob match collides after the first creates `foo`; adding `foo/` is a known workaround. Commit `260671d1a` / PR #784 is titled “Support globbing for organize,” but no explicit issue link or maintainer resolution is recorded, so the labeled, valid bug should remain open for verification rather than be closed on age alone.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 17 Complexity: 30 Confidence: 76 Actionability: 82

Issue body

A simple parts stenza with: organize: '*': foo will lead to this error message: Trying to organize file '*' to 'foo', but 'foo' already exists Which isn't the case (foo doesn't exists in stage/ nor prime/). I guess triggering situation is that * is a directory content with multiple items and destination is what looks like a filename to snapcraft. My bet is that the first item copy happens, and when trying to copy the second file/directory, we thus already have a "foo" file or directory corresponding to the first item to copy. Then, the error makes sense :) However, this is confusing to the user. The fix is of course to tell snapcraft to copy to a directory by appending /: organize: '*': foo/ My feeling is that the final / shouldn't be needed though and we should, in case of having a blob regexp, treat the right parts of the expression as a directory if there is more than one item matched. ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: snapcraft 2.26 ProcVersionSignature: Ubuntu 4.4.0-62.83-generic 4.4.40 Uname: Linux 4.4.0-62-generic x86_64 NonfreeKernelModules: zfs zunicode zcommon znvpair zavl ApportVersion: 2.20.1-0ubuntu2.5 Architecture: amd64 CurrentDesktop: Unity Date: Thu Feb 9 14:09:30 2017 InstallationDate: Installed on 2012-05-28 (1717 days ago) InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425) PackageArchitecture: all SourcePackage: snapcraft UpgradeStatus: Upgraded to xenial on 2014-10-31 (832 days ago)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 17
Complexity: 30
Confidence: 76
Actionability: 82
keep open Wildcard organize mappings can produce a misleading "foo already exists" collision for multiple matches without a trailing slash; the report remains open with a likely glob-support fix candidate.
stealth/space-bunny-alpha
Impact: 25
Quick Win: 19
Complexity: 15
Confidence: 94
Actionability: 88
close resolved The multi-match organize case now reports that multiple files target one destination and recommends a trailing slash, replacing the misleading claim that the destination already existed.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 70
Actionability: 80
keep open Confusing error message when using `organize` with glob patterns and a destination without trailing slash. Reported in 2017, still open.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 15
Staleness: 95
Complexity: 40
Confidence: 55
Support Request: 10
needs triage Snapcraft 2.26 (2017) reports a misleading 'already exists' error when an organize glob matches multiple items and the destination lacks a trailing slash; reporter suggests auto-treating the destination as a directory. No maintainer response; code has since moved to craft-parts.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 95
Support Request: 0
close stale Bug report from 2017 regarding a confusing error message in snapcraft 2.26 when organizing multiple source files to a destination without a trailing slash.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 15
close stale Bug report for snapcraft 2.26 describing a confusing error when organizing multiple source files to a non-directory destination. Filed in 2017 with no maintainer response or activity for over nine years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 20
Confidence: 90
Support Request: 10
close stale Reports a confusing error message in snapcraft 2.26 when organizing multiple source files to a destination without a trailing slash. Unaddressed for nearly a decade.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#784 (confidence 68%)

    The commit title directly concerns wildcard organize support and is a plausible fix, but the history does not establish that it closed snapcraft#1663233.

Related issues

Issue Project State Summary Similarity
#1844801 Organize has different move behavior when using wildcard snapcraft (launchpad) open Wildcard organize keys still preserve a matched directory name while explicit keys merge its contents; the reproducible report has no maintainer triage or discussion.
70%