← Back to issue list

IsADirectoryError occurred when migrating /usr/bin/X11 symlink in stage step

View original Launchpad issue

Metadata

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

Current evaluation

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.

Suggested action: close stale

Reason: The report targets snapcraft 3.3 (2019) and the traceback's code path (snapcraft/internal/pluginhandler/__init__.py _migrate_files calling os.remove(dst)) no longer exists — modern snapcraft delegates the parts/staging lifecycle to craft-parts, so this specific IsADirectoryError is no longer applicable. With 0 comments, no labels, and no maintainer interaction for ~7.4 years, and the affected version long unsupported, it is both inactive and obsolete.

Impact: 30 Quick Win: 18.0 Staleness: 100 Complexity: 40 Confidence: 75 Support Request: 0

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
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18.0
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.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 35
Confidence: 85
Support Request: 15
close stale Bug report for an IsADirectoryError during snapcraft stage when migrating a symlink pointing to the current directory. Unaddressed for over 7 years on deprecated v3.3.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.