← Back to issue list

Updating build with organize can result in "destination path already exists"

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1794083
Type
issue
State
closed
Author
~kyrofa
Labels
18.10-build-caching
Created
Updated
Closed

Current evaluation

Fixed in snapcore/snapcraft#2290 (commit 2cef6c3f6), making update builds overwrite prior organize output; #2305 was linked as the 18.10 follow-up.

Resolution: closed resolved

Reason: Commit 2cef6c3f6, “pluginhandler: update build should overwrite organize (#2290),” records the merged fix. Maintainer sergiusens subsequently linked #2305 as the follow-up for the 18.10 build-caching case.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The snapcraft CLI recently gained the ability to detect source changes and automatically rebuild the part. However, this exposes a shortcoming in the organize logic where globs can't be organized into the same directory twice. See https://sentry.io/share/issue/1cf002d0cc194fd8bd5033fa1dbaac04/ for more information.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in snapcore/snapcraft#2290 (commit 2cef6c3f6), making update builds overwrite prior organize output; #2305 was linked as the 18.10 follow-up.
stealth/space-bunny-alpha — closed resolved Fixed organize updates to overwrite existing destination files; merged in snapcraft PR #2290 (2cef6c3f6) and backported to legacy via #2305.
stealth/space-bunny-alpha — closed resolved Fixed update-build organize collisions by overwriting prior organized paths in merged PR #2290 (commit 2cef6c3f6); legacy backport PR #2305 also merged.
stealth/space-bunny-alpha — closed resolved Organize’s handling of multiple globs targeting one destination was fixed, preventing automatic rebuilds from failing with "destination path already exists."
qwen/qwen3.6-35b-a3b — — Closed without resolution. Snapcraft's automatic rebuild fails when organize globs map to the same directory twice, causing a path conflict. No fix or follow-up was documented.
qwen/qwen3.6-35b-a3b — — Closed without documented resolution. Snapcraft fails when auto-rebuilding and organizing globs into the same directory, triggering a destination path conflict. No fix or workaround was recorded.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#2290 (confidence 99%)

    Merged as commit 2cef6c3f6, changing update builds to overwrite existing organize output.

  • Related To: snapcore/snapcraft#2305 (confidence 90%)

    Cited by a maintainer as the subsequent 18.10 follow-up.

Related issues

Issue Project State Summary Similarity
#1599709 organize feature deletes destination folder, is surprising snapcraft (launchpad) closed Organize was changed to preserve existing destination files; the fix merged in snapcraft#780 as commit 8386479e7.
73%
#2290 pluginhandler: update build should overwrite organize snapcraft merged Merged PR #2290 at commit 2cef6c3f6 made organize overwrite previously organized files and directories, allowing build updates without cleaning and resolving LP #1794083.
71%
#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.
70%