"./mach clean" fails in case of symlinks.
Open
Nobody has claimed this yet.
I-papercut
L-python
- Dominant language
- Rust
- Stars
- 38k
- Forks
- 3.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 459
Description
if the build fails, Running ./mach clean gives the following error:
Removing virtualenv directory: /mnt/sda1/Documents/webpages/rust/servo/python/_virtualenv
Error running mach:
['clean']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
OSError: [Errno 39] Directory not empty: '/mnt/sda1/Documents/webpages/rust/servo/python/_virtualenv/lib/python2.7/site-packages/.libs_cffi_backend'
File "/mnt/sda1/Documents/webpages/rust/servo/python/servo/build_commands.py", line 762, in clean
shutil.rmtree(virtualenv_path)
File "/usr/lib/python2.7/shutil.py", line 270, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib/python2.7/shutil.py", line 270, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib/python2.7/shutil.py", line 270, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib/python2.7/shutil.py", line 270, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib/python2.7/shutil.py", line 279, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/usr/lib/python2.7/shutil.py", line 277, in rmtree
os.rmdir(path)
Environment: Linux (Ubuntu 19.04)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in servo/build_commands.py at the clean command around line 762 and reproduce the failure with ./mach clean on Linux using a virtualenv containing the reported symlink. Check how cleanup handles that path; done means ./mach clean removes the virtualenv without the Directory not empty error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100