IsADirectoryError occurred when migrating /usr/bin/X11 symlink in stage step
Metadata
Current evaluation
Snapcraft 3.3 staging aborted on IsADirectoryError for the usr/bin/X11 symlink to '.'; later commits fixed directory-targeted symlink handling.
Suggested action: close resolved
Reason: Commit 44d5277a7 (snapcraft#3370) explicitly addressed fix_symlink failures when its target was a directory, matching the reported X11 -> '.' failure. Follow-up commit 405c57655 (snapcraft#3497) corrected a regression in that same handling, confirming the historical defect was addressed.
Evaluated by: mr-cal-bot
Impact:
43
Quick Win:
24
Complexity:
38
Confidence:
87
Actionability:
89
Issue body
Bug reproduce instructions
---------------------------
1. git clone --branch=bug-20190410-guvcview https://github.com/Lin-Buo-Ren/snapcraft-bug-poc.git
2. cd snapcraft-bug-poc
3. snapcraft stage guvcview
Traceback
----------
```
Traceback (most recent call last):
File "/snap/snapcraft/2722/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==3.3', 'console_scripts', 'snapcraft')()
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/cli/__main__.py", line 81, in run
run_snapcraft(prog_name="snapcraft")
File "/snap/snapcraft/2722/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/snap/snapcraft/2722/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 251, in stage
_execute(steps.STAGE, parts, **kwargs)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/cli/lifecycle.py", line 126, in _execute
lifecycle.execute(step, project_config, parts)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 94, in execute
executor.run(step, part_names)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 148, in run
self._handle_step(part_names, part, step, current_step, cli_config)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 162, in _handle_step
getattr(self, "_run_{}".format(current_step.name))(part)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 226, in _run_stage
self._run_step(step=steps.STAGE, part=part, progress="Staging")
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/lifecycle/_runner.py", line 281, in _run_step
getattr(part, step.name)()
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 722, in stage
self._runner.stage()
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 84, in stage
"override-stage", self._override_stage_scriptlet, self._stagedir
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 137, in _run_scriptlet
scriptlet_name, function_call.strip()
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 193, in _handle_builtin_function
function(**function_args)
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 744, in _do_stage
fixup_func=fixup_func,
File "/snap/snapcraft/2722/lib/python3.5/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 1097, in _migrate_files
os.remove(dst)
IsADirectoryError: [Errno 21] Is a directory: '/root/stage/usr/bin/X11'
```
Snapcraft
----------
Host: version 3.3+git17.g1b29058 from edge channel
Build environment: 3.3
Additional info
---------------
The `usr/bin/X11` symlink is shipped by x11-commons package, and for whatever reason points to `.`
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
43
Quick Win:
24
Complexity:
38
Confidence:
87
Actionability:
89
|
close resolved | Snapcraft 3.3 staging aborted on IsADirectoryError for the usr/bin/X11 symlink to '.'; later commits fixed directory-targeted symlink handling. | |
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
24
Complexity:
35
Confidence:
78
Actionability:
76
|
needs triage | Snapcraft 3.3 staging crashes on a /usr/bin/X11 symlink to '.'; detailed reproduction exists, but the report has no maintainer response or labels. | |
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
18
Staleness:
100
Complexity:
40
Confidence:
75
Support Request:
0
|
close stale | snapcraft 3.3 (2019) crashes with IsADirectoryError in _migrate_files when staging a symlink (usr/bin/X11) that points to '.'. 2701 days old, 0 comments, no labels, no maintainer interaction; old internal staging code since rewritten. | |
| qwen/qwen3.8-27b |
Impact:
35
Quick Win:
21
Staleness:
95
Complexity:
40
Confidence:
60
Support Request:
10
|
close stale | IsADirectoryError in snapcraft 3.3 stage step when migrating the x11-commons /usr/bin/X11 symlink (points to '.'). Unlabeled, 0 comments, no maintainer activity for 7+ years; the code path and version no longer exist in the current codebase. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
40
Confidence:
85
Support Request:
5
|
close stale | Bug report for IsADirectoryError during snapcraft stage when migrating a symlink pointing to '.'. Currently inactive for over 7 years with no maintainer interaction or labels. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
35
Confidence:
85
Support Request:
0
|
close stale | IsADirectoryError occurred when migrating /usr/bin/X11 symlink in stage step. Issue is over 7 years old, references Snapcraft 3.3, and has had no maintainer interaction or activity. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
45
Confidence:
90
Support Request:
5
|
close stale | Bug report for IsADirectoryError during snapcraft stage step when migrating a symlink pointing to dot. Reported over seven years ago on version 3.3 with no maintainer response or activity. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#3370
(confidence 93%)
Commit 44d5277a7 addresses fix_symlink when pointed at a directory.
-
Likely Fixed By:
snapcraft#3497
(confidence 88%)
Commit 405c57655 fixes a subsequent regression in fix_symlink handling.
Related issues
No related issues found above the similarity threshold.