Message159178
With current working dir an NFS-mounted ZFS share, and /var/tmp (OSX default) HFS+:
% echo "test" > /var/tmp/testfile
% python
Python 2.7.3 (default, Apr 24 2012, 19:33:45)
[GCC 4.2.1 (Gentoo 4.2.1_p5666, Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.move("/var/tmp/testfile", "./testfile");
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Gentoo/usr/lib/python2.7/shutil.py", line 299, in move
copy2(src, real_dst)
File "/Library/Gentoo/usr/lib/python2.7/shutil.py", line 129, in copy2
copystat(src, dst)
File "/Library/Gentoo/usr/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 45] Operation not supported: './testfile'
>>>
% ls /var/tmp/testfile ./testfile
./testfile /var/tmp/testfile
The problem likely is that the flags stored on the HFS+ volume cannot be applied to the NFS-mounted ZFS volume. This likely also occurs when doing a bit more regular things, like e.g. moving/copying to a mounted USB disk (with FAT32 filesystem).
I believe this is a "regression" introduced by http://bugs.python.org/issue8746. Python-2.7.2 works fine.
While preserving flags is nice, it is questionable whether failure to do so in this case is worth dying for. In particular, leaving behind both the original as well as the copy is a bit messy. |
|
Date |
User |
Action |
Args |
2012-04-24 17:58:52 | grobian | set | recipients:
+ grobian |
2012-04-24 17:58:52 | grobian | set | messageid: <1335290332.17.0.906605532092.issue14662@psf.upfronthosting.co.za> |
2012-04-24 17:58:51 | grobian | link | issue14662 messages |
2012-04-24 17:58:51 | grobian | create | |
|