← Back to issue list

Using organize to move a folder to a child folder fails due to recursion

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1668555
Type
issue
State
open
Author
~jamesh
Labels
Created
Updated
Closed

Current evaluation

Snapcraft organize directive causes infinite recursion when moving a folder into its own child path (e.g. '.': lib/python3.6/site-packages). Workaround via glob ('*') documented in issue. 9+ years old, zero comments, no labels, never triaged.

Suggested action: needs triage

Reason: Issue has no labels, no comments, no assignee, and zero maintainer interaction across 3471 days — it was never assessed. However, I could not verify via code inspection whether the organize recursion bug was fixed in the current parts system (tool access failed), so closing as stale would be premature without confirming the bug no longer reproduces. A workaround (using '*' glob) is documented in the issue body, reducing urgency.

Impact: 30 Quick Win: 18.0 Staleness: 95 Complexity: 40 Confidence: 40 Support Request: 15

Issue body

I created a part in my snapcraft.yaml file with the following directive: plugin: dump source: src organize: .: lib/python3.6/site-packages The intention being to move all the source files to a subdirectory. However, in the process of reorganising the installed files, it was also trying to move lib/python3.6/site-packages under lib/python3.6/site-packages, and doing so recursively until it errors out when the file name gets too long. I could avoid the problem by changing the directive to the following, which I guess avoided the problem because the glob was expanded before trying to reorganise the tree. organize: '*': lib/python3.6/site-packages/

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18.0
Staleness: 95
Complexity: 40
Confidence: 40
Support Request: 15
needs triage Snapcraft organize directive causes infinite recursion when moving a folder into its own child path (e.g. '.': lib/python3.6/site-packages). Workaround via glob ('*') documented in issue. 9+ years old, zero comments, no labels, never triaged.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 5
close stale Bug in snapcraft organize directive causes infinite recursion when moving files into a matching subdirectory. Unaddressed for over 9 years with no maintainer interaction or labels.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 85
Support Request: 10
close stale Snapcraft's organize directive causes infinite recursion when moving files to a newly created subdirectory. Untriaged, inactive for ~9 years, no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 15
close stale Infinite recursion bug when using the organize directive to move files to a subdirectory in snapcraft dump plugin. Unassessed and inactive for over nine years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 90
Support Request: 10
close stale snapcraft organize directive causes infinite recursion when moving a directory into its own subdirectory. Unassigned, inactive for years, zero comments. Requires triage and a fix to prevent self-referential path expansion.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1844801 Organize has different move behavior when using wildcard snapcraft (launchpad) open Snapcraft organize keyword moves directory contents for literal paths but the directory itself for glob/wildcard paths, causing confusing 'already exists' errors. No maintainer response in 7 years; behavior still present in craft-parts organize code. Needs triage.
73%