-
Notifications
You must be signed in to change notification settings - Fork 103
Description
attic checks if extended attributes are enabled in func defined in attic/xattr.py
def is_enabled():
"""Determine if xattr is enabled on the filesystem
"""
with tempfile.NamedTemporaryFile() as fd:
.....
but really the func only checks if extended attributes are enabled in /tmp directory, what seems to be not quite right for every scenario (in opensuse 13.2 /tmp is mountpoint for tmpfs).
There are also other issue concerning extenden attributed - not every filesystem makes possible to set it for links, what attic seems to assume, when extended attributes work it must work the same way in every filesystem.
Tests in my opensuse 13.2 installation can't really be performed:
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/Attic-0.14_dirty-py3.4-linux-i686.egg/attic/testsuite/archiver.py", line 152, in test_basic_functionality
self.create_test_files()
File "/usr/lib/python3.4/site-packages/Attic-0.14_dirty-py3.4-linux-i686.egg/attic/testsuite/archiver.py", line 145, in create_test_files
xattr.setxattr(os.path.join(self.input_path, 'link1'), 'user.foo_symlink', b'bar_symlink', follow_symlinks=False)
File "/usr/lib/python3.4/site-packages/Attic-0.14_dirty-py3.4-linux-i686.egg/attic/xattr.py", line 101, in setxattr
_check(func(path, name, value, len(value) if value else 0, 0), path)
File "/usr/lib/python3.4/site-packages/Attic-0.14_dirty-py3.4-linux-i686.egg/attic/xattr.py", line 36, in _check
raise OSError(get_errno(), path)
PermissionError: [Errno 1] b'/tmp/tmpx6jsc97w/input/link1'