From ae8b18f868c9bd039643f89f28f9d92ce8966c3c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 22 Nov 2020 11:37:05 -0800 Subject: compare_files: fix missing xattr handling Fixes: a2e7bf7d1c7d ("compare_files: handle missing xattr support") Bug: https://bugs.gentoo.org/755950 Signed-off-by: Zac Medico --- lib/portage/util/_compare_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portage/util/_compare_files.py b/lib/portage/util/_compare_files.py index 60d43aefa..7692797fc 100644 --- a/lib/portage/util/_compare_files.py +++ b/lib/portage/util/_compare_files.py @@ -9,7 +9,7 @@ import stat from portage import _encodings from portage import _unicode_encode -from portage.util._xattr import xattr +from portage.util._xattr import XATTRS_WORKS, xattr def compare_files(file1, file2, skipped_types=()): """ @@ -45,7 +45,7 @@ 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.XATTRS_WORKS and "xattr" not in skipped_types and + if (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") -- cgit v1.2.3