From d6d555e0b43d0beee617952267406c305edecb05 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 3 Sep 2013 13:03:17 -0700 Subject: [PATCH] _copyxattr: handle EOPNOTSUPP from xattr.list() --- pym/portage/util/movefile.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py index 4ac453513..1f92b59b7 100644 --- a/pym/portage/util/movefile.py +++ b/pym/portage/util/movefile.py @@ -98,7 +98,19 @@ else: if xattr is not None: def _copyxattr(src, dest, exclude=None): - attrs = xattr.list(src) + try: + attrs = xattr.list(src) + raise_exception = False + except IOError as e: + raise_exception = True + if e.errno != OperationNotSupported.errno: + raise + if raise_exception: + raise OperationNotSupported( + _("Filesystem containing file '%s' " + "does not support listing of extended attributes") % + (_unicode_decode(src),)) + if attrs: if exclude is not None and isinstance(attrs[0], bytes): exclude = exclude.encode(_encodings['fs']) -- 2.26.2