From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 finch.gentoo.org (Postfix) with ESMTPS id 8DD4B1581FD for ; Thu, 11 Sep 2025 11:27:06 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (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) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 77B4D340834 for ; Thu, 11 Sep 2025 11:27:06 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 75131110377; Thu, 11 Sep 2025 11:27:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 bobolink.gentoo.org (Postfix) with ESMTPS id 69874110377 for ; Thu, 11 Sep 2025 11:27:05 +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 244B2340834 for ; Thu, 11 Sep 2025 11:27:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 58DA1322B for ; Thu, 11 Sep 2025 11:27:03 +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: <1757590019.c7f4f90b6c95d33d713cadc94a13f11cbbf3eeef.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: c7f4f90b6c95d33d713cadc94a13f11cbbf3eeef X-VCS-Branch: master Date: Thu, 11 Sep 2025 11:27:03 +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: 7e1b722b-3865-4dda-9b41-4822d9e528e0 X-Archives-Hash: bfc9fa41bcda0bbcca745fb66d1d95b3 commit: c7f4f90b6c95d33d713cadc94a13f11cbbf3eeef Author: Florian Schmaus gentoo org> AuthorDate: Wed Sep 10 10:52:58 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Sep 11 11:26:59 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c7f4f90b bintree: Suppress up-to-date message if it isn't true Portage would emit a message claiming that the local copy of the remote index is up-to-date when getbinpkg_refresh=False. However, if getbinpkg_refresh is set to False, then this doesn't mean that the local copy is up-to-date. It means that we didn't check if it's up-to-date. Since populate() is potentially multiple times, typically the second time with getbinpkg_refresh set to False, this leads to multiple "Local copy of remote index is up-to-date" messages, even if just one binhost is configured. To avoid this potentially confusing behavior, suppress the message in case getbinpkg_refresh is set to False. Signed-off-by: Florian Schmaus gentoo.org> Part-of: https://github.com/gentoo/portage/pull/1456 Closes: https://github.com/gentoo/portage/pull/1456 Signed-off-by: Sam James gentoo.org> lib/portage/dbapi/bintree.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/portage/dbapi/bintree.py b/lib/portage/dbapi/bintree.py index f6bc0d7490..7152e72eba 100644 --- a/lib/portage/dbapi/bintree.py +++ b/lib/portage/dbapi/bintree.py @@ -1580,16 +1580,18 @@ class binarytree: ) except UseCachedCopyOfRemoteIndex: changed = False - desc = "frozen" if repo.frozen else "up-to-date" - writemsg_stdout("\n") - writemsg_stdout( - colorize( - "GOOD", - _("Local copy of remote index is %s and will be used.") % desc, - ) - + "\n" - ) rmt_idx = pkgindex + if getbinpkg_refresh or repo.frozen: + desc = "frozen" if repo.frozen else "up-to-date" + writemsg_stdout("\n") + writemsg_stdout( + colorize( + "GOOD", + _("Local copy of remote index is %s and will be used.") + % desc, + ) + + "\n" + ) except OSError as e: # This includes URLError which is raised for SSL # certificate errors when PEP 476 is supported.