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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ABE40158020 for ; Tue, 8 Nov 2022 23:07:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 50E6FE0A00; Tue, 8 Nov 2022 23:07:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 33826E0A00 for ; Tue, 8 Nov 2022 23:07:56 +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 3BF4A340E01 for ; Tue, 8 Nov 2022 23:07:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 74ECE6DF for ; Tue, 8 Nov 2022 23:07:53 +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: <1667948866.a7dd39c1ae4a5ea4e3252ae8129fbd671c95d5f7.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/dbapi/bintree.py X-VCS-Directories: lib/portage/dbapi/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a7dd39c1ae4a5ea4e3252ae8129fbd671c95d5f7 X-VCS-Branch: master Date: Tue, 8 Nov 2022 23:07:53 +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: a0c132c7-631c-4791-9071-0820d10e8f67 X-Archives-Hash: 474a4810b0c5e8449395353f63355c1b commit: a7dd39c1ae4a5ea4e3252ae8129fbd671c95d5f7 Author: Sheng Yu protonmail com> AuthorDate: Tue Nov 8 22:52:46 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 8 23:07:46 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a7dd39c1 Do not drop default PATH in the package index (avoid Packages regeneration) The new Packages index (introduced in 445f10f4214c673f8fe0a9cc518c12767be4f159) needs PATH but it got dropped later on when processing, so we would try to rebuild the index on every emerge call. This fixes regenerating Packages loop. (Note that this didn't affect a released version.) Fixes: 445f10f4214c673f8fe0a9cc518c12767be4f159 Bug: https://bugs.gentoo.org/877357 Bug: https://bugs.gentoo.org/877419 Signed-off-by: Sheng Yu protonmail.com> Closes: https://github.com/gentoo/portage/pull/934 Signed-off-by: Sam James gentoo.org> lib/portage/dbapi/bintree.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index 771abedd5..d7c18e2e9 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -1000,20 +1000,9 @@ class binarytree: pkg_paths[instance_key] = mypath # update the path if the package has been moved oldpath = d.get("PATH") - if oldpath and oldpath != mypath: - update_pkgindex = True - # Omit PATH if it is the default path for - # the current Packages format version. - if (mypath != mycpv + ".tbz2") and ( - mypath != mycpv + ".gpkg.tar" - ): + if oldpath != mypath: d["PATH"] = mypath - if not oldpath: - update_pkgindex = True - else: - d.pop("PATH", None) - if oldpath: - update_pkgindex = True + update_pkgindex = True self.dbapi.cpv_inject(mycpv) continue if not os.access(full_path, os.R_OK): @@ -1218,11 +1207,7 @@ class binarytree: self.dbapi.cpv_remove(mycpv) del pkg_paths[_instance_key(mycpv)] - # record location if it's non-default - if (mypath != mycpv + ".tbz2") and (mypath != mycpv + ".gpkg.tar"): - d["PATH"] = mypath - else: - d.pop("PATH", None) + d["PATH"] = mypath metadata[_instance_key(mycpv)] = d if reindex: