From 198721e175fdc7c7fdf2fc2395bd4607bba97b24 Mon Sep 17 00:00:00 2001 From: Siddhanth Rathod Date: Fri, 29 Sep 2023 00:24:44 +0530 Subject: [PATCH] Fix: Recent decision to make FEATURES=pkgdir-index-trusted is now on by default breaks eclean-invalids feature See_also: https://github.com/gentoo/portage/commit/3bc7bfef51d88fd716e882d3931f2873e3493e01 Signed-off-by: Siddhanth Rathod --- pym/gentoolkit/eclean/search.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py index a2ac0ce4..f6bf8378 100644 --- a/pym/gentoolkit/eclean/search.py +++ b/pym/gentoolkit/eclean/search.py @@ -16,13 +16,12 @@ import gentoolkit.pprinter as pp from gentoolkit.eclean.exclude import ( - exclDictMatchCP, exclDictExpand, exclDictExpandPkgname, + exclDictMatchCP, exclMatchFilename, ) - # Misc. shortcuts to some portage stuff: port_settings = portage.settings pkgdir = port_settings["PKGDIR"] @@ -568,7 +567,12 @@ def findPackages( dead_binpkgs: dict[str, list[str]] = {} keep_binpkgs = {} - bin_dbapi = portage.binarytree(pkgdir=pkgdir, settings=var_dbapi.settings).dbapi + # FEATURES=pkgdir-index-trusted is now on by default which makes portages inavlids + # inaccessible + settings = var_dbapi.settings + settings.unlock() + settings.features.remove("pkgdir-index-trusted") + bin_dbapi = portage.binarytree(pkgdir=pkgdir, settings=settings).dbapi for cpv in bin_dbapi.cpv_all(): cp = portage.cpv_getkey(cpv)