This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月18日 08:50 by nvetoshkin, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (7) | |||
|---|---|---|---|
| msg161042 - (view) | Author: Vetoshkin Nikita (nvetoshkin) | Date: 2012年05月18日 08:50 | |
When I attempt to remove package with pysetup remove 'package-name' on Fedora 17 - it fails with: 'my-package' cannot be removed Error: [Errno 18] Invalid cross-device link strace'ing showed that there was an attempt to call rename from package dir into /tmp which is tmpfs. Proposed fix is trivial - use shutil.move instead of barebone os.rename. |
|||
| msg161052 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年05月18日 14:41 | |
How did you install my-package? |
|||
| msg161053 - (view) | Author: Vetoshkin Nikita (nvetoshkin) | Date: 2012年05月18日 14:45 | |
pysetup install.
strace of removal looks like this:
stat("/home/nekto0n/workspace/pillar/penv/lib/python2.7/site-packages/ygroup/__init__.py", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
rename("/home/nekto0n/workspace/pillar/penv/lib/python2.7/site-packages/ygroup/__init__.py", "/tmp/ygroup-client-uninstalljkoIAl/__init__.py") = -1 EXDEV (Invalid cross-device link)
|
|||
| msg162572 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月10日 01:31 | |
OK. Can you paste the full traceback for the error? |
|||
| msg162751 - (view) | Author: Vetoshkin Nikita (nvetoshkin) | Date: 2012年06月14日 04:50 | |
Sorry, no traceback by default, had to augment with "raise" :) Now output looks like this: nekto0n@ya-darkstar /var/tmp/mypackage $ pysetup remove pygraphviz u'workflow': u'1.01' is not a valid version (field 'Version') u'zc-zookeeper-static': u'3.4.3-3' is not a valid version (field 'Version') u'virtkey': u'0.01' is not a valid version (field 'Version') u'SSSDConfig': u'1' is not a valid version (field 'Version') [Errno 18] Invalid cross-device link Traceback (most recent call last): File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/run.py", line 651, in main return dispatcher() File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/run.py", line 639, in __call__ return func(self, self.args) File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/run.py", line 91, in wrapper return f(*args, **kwargs) File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/run.py", line 239, in _remove remove(dist, auto_confirm=auto_confirm) File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/install.py", line 413, in remove error = _move_file(file_, tmpfile) File "/home/nekto0n/.local/lib/python2.7/site-packages/distutils2/install.py", line 399, in _move_file os.rename(source, target) OSError: [Errno 18] Invalid cross-device link According to strace arguments to rename where: rename("/home/nekto0n/.local/lib/python2.7/site-packages/pygraphviz-1.1-py2.7.egg-info/PKG-INFO", "/tmp/pygraphviz-uninstallIiAQ1I/PKG-INFO") = -1 EXDEV (Invalid cross-device link) |
|||
| msg162753 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月14日 05:17 | |
Thanks! As your message shows the problem is in the install module, I propose to close this bug as a duplicate of Alexis’ bug about improving d2.install. The new FileMover class should use shutil.move, and we’ll make sure to test install+remove as you did to see if the bug is gone. |
|||
| msg162755 - (view) | Author: Vetoshkin Nikita (nvetoshkin) | Date: 2012年06月14日 05:19 | |
glad to help |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59053 |
| 2014年03月13日 08:34:46 | eric.araujo | set | status: open -> closed resolution: out of date stage: needs patch -> resolved |
| 2012年06月14日 05:19:43 | nvetoshkin | set | messages: + msg162755 |
| 2012年06月14日 05:17:11 | eric.araujo | set | assignee: eric.araujo -> alexis messages: + msg162753 |
| 2012年06月14日 04:50:17 | nvetoshkin | set | messages: + msg162751 |
| 2012年06月10日 01:31:51 | eric.araujo | set | title: os.rename should not be used -> Use shutil.move instead of os.rename in packaging messages: + msg162572 stage: needs patch |
| 2012年05月18日 14:45:06 | nvetoshkin | set | messages: + msg161053 |
| 2012年05月18日 14:41:54 | eric.araujo | set | messages:
+ msg161052 versions: + 3rd party, Python 3.3, - Python 2.7 |
| 2012年05月18日 08:50:31 | nvetoshkin | create | |