From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AFB8D158089 for ; Fri, 29 Sep 2023 07:20:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DFBA42BC022; Fri, 29 Sep 2023 07:20:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C176B2BC022 for ; Fri, 29 Sep 2023 07:20:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08322335C78 for ; Fri, 29 Sep 2023 07:20:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 637A01188 for ; Fri, 29 Sep 2023 07:20:23 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1695972018.e49cc3493ab77678a740bf8a27cf22e77e061409.sam@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/eclean/search.py X-VCS-Directories: pym/gentoolkit/eclean/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e49cc3493ab77678a740bf8a27cf22e77e061409 X-VCS-Branch: master Date: Fri, 29 Sep 2023 07:20:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: dbc36582-0725-49cb-b8f5-5a9cb2d09c85 X-Archives-Hash: afc234f68daf1e6ed22312176bdb2305 commit: e49cc3493ab77678a740bf8a27cf22e77e061409 Author: Siddhanth Rathod gmail com> AuthorDate: Thu Sep 28 18:54:44 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 29 07:20:18 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=e49cc349 eclean-pkg: fix compatibility with FEATURES=pkgdir-index-trusted Portage recently enabled FEATURES=pkgdir-index-trusted by default which breaks the eclean-invalids feature. Force reindexing after cleaning up to fix this. See-also: https://github.com/gentoo/portage/commit/3bc7bfef51d88fd716e882d3931f2873e3493e01 Bug: https://bugs.gentoo.org/889300 Bug: https://bugs.gentoo.org/900224 Signed-off-by: Siddhanth Rathod gmail.com> Closes: https://github.com/gentoo/gentoolkit/pull/34 Signed-off-by: Sam James gentoo.org> pym/gentoolkit/eclean/search.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py index a2ac0ce..ce8fe37 100644 --- a/pym/gentoolkit/eclean/search.py +++ b/pym/gentoolkit/eclean/search.py @@ -8,6 +8,7 @@ import os import stat import sys from functools import partial +from inspect import signature from typing import Optional import portage @@ -16,13 +17,12 @@ from portage.dep._slot_operator import strip_slots 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 "force_reindex" in signature(bin_dbapi.bintree.populate).parameters: + bin_dbapi.bintree.populate(force_reindex=True) for cpv in bin_dbapi.cpv_all(): cp = portage.cpv_getkey(cpv)