python - os.copystat fails on panfs when u+w not set on src, causing pip install to fail; where to report a bug? -


i'm doing pip install ., current working directory on panfs filesystem. when pip tries copy directory tree, including files in .git, fails due failure in os.setxattr:

$ pip install . processing /home/users/gholl/checkouts/pyatmlab exception: traceback (most recent call last):   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/basecommand.py", line 223, in main     status = self.run(options, args)   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/commands/install.py", line 280, in run     requirement_set.prepare_files(finder)   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 317, in prepare_files     functools.partial(self._prepare_file, finder))   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 304, in _walk_req_to_install     more_reqs = handler(req_to_install)   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/req/req_set.py", line 469, in _prepare_file     session=self.session)   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/download.py", line 814, in unpack_url     unpack_file_url(link, location, download_dir)   file "/home/users/gholl/venv/stable-3.4/lib/python3.4/site-packages/pip/download.py", line 699, in unpack_file_url     shutil.copytree(link_path, location, symlinks=true)   file "/home/users/gholl/lib/python3.4/shutil.py", line 343, in copytree     raise error(errors) shutil.error: [('/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack', '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack', "[errno 13] permission denied: '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack'"), ('/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx', '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx', "[errno 13] permission denied: '/tmp/pip-6lrnz9vs-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.idx'")] 

some deeper digging shows error originates in:

traceback (most recent call last):   file "/home/users/gholl/lib/python3.4/shutil.py", line 329, in copytree     copy_function(srcname, dstname)   file "/home/users/gholl/lib/python3.4/shutil.py", line 246, in copy2     copystat(src, dst, follow_symlinks=follow_symlinks)   file "/home/users/gholl/lib/python3.4/shutil.py", line 213, in copystat     _copyxattr(src, dst, follow_symlinks=follow)   file "/home/users/gholl/lib/python3.4/shutil.py", line 153, in _copyxattr     os.setxattr(dst, name, value, follow_symlinks=follow_symlinks) permissionerror: [errno 13] permission denied: '/tmp/pip-y3dw8fwa-build/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack'  file "/home/users/gholl/lib/python3.4/shutil.py", line 329, in copytree 

...and can reproduced by:

in [55]: shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack", "/tmp/fubar") --------------------------------------------------------------------------- permissionerror                           traceback (most recent call last) <ipython-input-55-139c9fc77184> in <module>() ----> 1 shutil.copystat("/home/users/gholl/checkouts/pyatmlab/.git/objects/pack/pack-c1449559ec4287b3830efe2913608dddf2f21391.pack", "/tmp/fubar")  /home/users/gholl/lib/python3.4/shutil.py in copystat(src, dst, follow_symlinks)     211             else:     212                 raise --> 213     _copyxattr(src, dst, follow_symlinks=follow)     214     215 def copy(src, dst, *, follow_symlinks=true):  /home/users/gholl/lib/python3.4/shutil.py in _copyxattr(src, dst, follow_symlinks)     151             try:     152                 value = os.getxattr(src, name, follow_symlinks=follow_symlinks) --> 153                 os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)     154             except oserror e:     155                 if e.errno not in (errno.eperm, errno.enotsup, errno.enodata):  permissionerror: [errno 13] permission denied: '/tmp/fubar' 

this occurs source file user write bit not set.

now, should handle this? bug in pip, shutil.copytree, shutil.copystat, setxattr, panfs, or none of above?


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -