.TP
.B webrsync-gpg
Enable GPG verification when using \fIemerge\-webrsync\fR.
+.TP
+.B xattr
+Preserve extended attributes (filesystem-stored metadata) when installing
+files (see \fBattr\fR(1)).
.RE
.TP
.B FETCHCOMMAND
"strict", "stricter", "suidctl", "test", "test-fail-continue",
"unknown-features-filter", "unknown-features-warn",
"unmerge-logs", "unmerge-orphans", "userfetch", "userpriv",
- "usersandbox", "usersync", "webrsync-gpg"])
+ "usersandbox", "usersync", "webrsync-gpg", "xattr"])
EAPI = 4
mysettings = portage.settings
src_bytes = _unicode_encode(src, encoding=encoding, errors='strict')
+ xattr_enabled = "xattr" in mysettings.features
selinux_enabled = mysettings.selinux_enabled()
if selinux_enabled:
selinux = _unicode_module_wrapper(_selinux, encoding=encoding)
try: # For safety copy then move it over.
if selinux_enabled:
selinux.copyfile(src, dest_tmp)
- _copyxattr(src_bytes, dest_tmp_bytes)
+ if xattr_enabled:
+ _copyxattr(src_bytes, dest_tmp_bytes)
_apply_stat(sstat, dest_tmp_bytes)
selinux.rename(dest_tmp, dest)
else:
shutil.copyfile(src, dest_tmp)
- _copyxattr(src_bytes, dest_tmp_bytes)
+ if xattr_enabled:
+ _copyxattr(src_bytes, dest_tmp_bytes)
_apply_stat(sstat, dest_tmp_bytes)
os.rename(dest_tmp, dest)
os.unlink(src)