commit: a2e7bf7d1c7d518fe8d7cf2c0e6cb30020b8aa94 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sat Nov 21 21:13:27 2020 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Nov 22 06:17:29 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a2e7bf7d
compare_files: handle missing xattr support Bug: https://bugs.gentoo.org/755950 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/util/_compare_files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/portage/util/_compare_files.py b/lib/portage/util/_compare_files.py index de97a9d9d..60d43aefa 100644 --- a/lib/portage/util/_compare_files.py +++ b/lib/portage/util/_compare_files.py @@ -45,7 +45,8 @@ def compare_files(file1, file2, skipped_types=()): if "device_number" not in skipped_types and file1_stat.st_rdev != file2_stat.st_rdev: differences.append("device_number") - if "xattr" not in skipped_types and sorted(xattr.get_all(file1, nofollow=True)) != sorted(xattr.get_all(file2, nofollow=True)): + if (xattr.XATTRS_WORKS and "xattr" not in skipped_types and + sorted(xattr.get_all(file1, nofollow=True)) != sorted(xattr.get_all(file2, nofollow=True))): differences.append("xattr") if "atime" not in skipped_types and file1_stat.st_atime_ns != file2_stat.st_atime_ns:
