Collision detection doesn't compare symlinks to files or directories
Metadata
Current evaluation
Collision handling was fixed by snapcore/snapcraft#1064, merged as commit d4b104887, adding directory/symlink comparisons.
Resolution: closed resolved
Reason: PR snapcore/snapcraft#1064 was re-proposed after the earlier attempt stalled and landed as commit d4b104887. It updated plugin collision detection to compare directories and symlink targets.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Snapcraft runs a collision detection algorithm when attempting to merge two parts. This algorithm has two related issues:
1. It only compares files, which means files (e.g. symlinks) that collide with directories are missed until the migration is attempted, at which point cryptic "destination is a directory" errors are raised.
2. If a file in both parts is a symlink, it immediately assumes they don't collide, without checking where they're pointing. If they point to different places they _should_ collide.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Collision handling was fixed by snapcore/snapcraft#1064, merged as commit d4b104887, adding directory/symlink comparisons. | |
| stealth/space-bunny-alpha | — | closed resolved | Collision detection was fixed when PR #1064 merged via commit d4b104887, adding directory and symlink-target comparisons during part merges. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by PR #1064 (commit d4b104887), which updated collision detection to handle directories and symlinks when merging parts. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or associated pull request. The collision detection algorithm remains unpatched, leaving symlink-to-file and symlink-to-symlink collision checks unimplemented. Issue appears abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Snapcraft's collision detection remains unpatched, failing to detect symlinks colliding with files or directories and incorrectly assuming distinct symlinks never conflict. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The report detailed two collision detection flaws in Snapcraft regarding symlinks and file-directory comparisons. With zero comments and over eight years of inactivity, it was abandoned without a fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Symlink collision detection flaws were not addressed. The report was closed without a fix or discussion, indicating it was abandoned due to prolonged inactivity. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#1064
(confidence 99%)
The PR named in the issue discussion was merged as commit d4b104887 with the matching collision-detection fix.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1658155 file_utils.link_or_copy_tree doesn't maintain symlinks to directories | snapcraft (launchpad) | closed | Fixed directory-symlink handling in file_utils.link_or_copy_tree by merging snapcore/snapcraft PR #1063 in commit 7768cd33b. |