Summary: | xattr code always triggered, stub code always fails | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Fabian Groffen <grobian> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cognifloyd+gentoobugs, sam |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | OS X | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 755644, 756028 |
Description
Fabian Groffen
![]() We should fix the compare_files function to skip xattrs comparison, like this:
> diff --git a/lib/portage/util/_compare_files.py b/lib/portage/util/_compare_files.py
> index de97a9d9d..334aeb0bf 100644
> --- a/lib/portage/util/_compare_files.py
> +++ b/lib/portage/util/_compare_files.py
> @@ -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" 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
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=a2e7bf7d1c7d518fe8d7cf2c0e6cb30020b8aa94 commit a2e7bf7d1c7d518fe8d7cf2c0e6cb30020b8aa94 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-11-21 21:13:27 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-11-22 06:17:29 +0000 compare_files: handle missing xattr support Bug: https://bugs.gentoo.org/755950 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/_compare_files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b723fb347408dcd76ab4121f9cf94b0c51d48223 commit b723fb347408dcd76ab4121f9cf94b0c51d48223 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-11-22 06:43:39 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-11-22 06:47:30 +0000 sys-apps/portage: Bump to version 3.0.10 #753497 profiles should not inherit deprecated messages #754903 minimize use of installed packages to break cycles #755950 compare_files: handle missing xattr support Bug: https://bugs.gentoo.org/753497 Bug: https://bugs.gentoo.org/754903 Bug: https://bugs.gentoo.org/755950 Bug: https://bugs.gentoo.org/756028 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.10.ebuild | 267 +++++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+) Thanks a lot for the swift response and fix Zac! I've done a clean deploy now, and the error (shortened) with commit c51d48223 changed to: File "/Scratch/Gentoo/bootstrap64-20201122/tmp/usr/lib/python3.7/portage/util/_compare_files.py", line 48, in compare_files if (xattr.XATTRS_WORKS and "xattr" not in skipped_types and AttributeError: type object '_XattrStub' has no attribute 'XATTRS_WORKS' The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=ae8b18f868c9bd039643f89f28f9d92ce8966c3c commit ae8b18f868c9bd039643f89f28f9d92ce8966c3c Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-11-22 19:37:05 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-11-22 19:38:51 +0000 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 <zmedico@gentoo.org> lib/portage/util/_compare_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04117118ee16f77ac19eb081f774277a0931729 commit d04117118ee16f77ac19eb081f774277a0931729 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-11-22 19:52:00 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-11-22 19:54:32 +0000 sys-apps/portage: 3.0.10-r1 revbump for bug 755950 #755950 compare_files: fix missing xattr handling Bug: https://bugs.gentoo.org/756028 Bug: https://bugs.gentoo.org/755950 Package-Manager: Portage-3.0.10, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/{portage-3.0.10.ebuild => portage-3.0.10-r1.ebuild} | 5 +++++ 1 file changed, 5 insertions(+) thanks again Zac, this time confirmed, this does the trick fixed with portage-3.0.10.2 |