diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py index a2ac0ce4..176b9529 100644 --- a/pym/gentoolkit/eclean/search.py +++ b/pym/gentoolkit/eclean/search.py @@ -8,6 +8,7 @@ import stat import sys from functools import partial +from inspect import signature from typing import Optional import portage @@ -16,13 +17,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 +568,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 + bin_dbapi = portage.binarytree(pkgdir=pkgdir, settings=settings).dbapi + if signature(bin_dbapi.bintree.populate).parameters["force_reindex"]: + bin_dbapi.bintree.populate(force_reindex=True) for cpv in bin_dbapi.cpv_all(): cp = portage.cpv_getkey(cpv)