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 3665F158015 for ; Wed, 27 Dec 2023 13:31:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 601542BC020; Wed, 27 Dec 2023 13:31:00 +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 pigeon.gentoo.org (Postfix) with ESMTPS id 3AFFA2BC020 for ; Wed, 27 Dec 2023 13:31:00 +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 342DB340940 for ; Wed, 27 Dec 2023 13:30:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 67A7713A0 for ; Wed, 27 Dec 2023 13:30:57 +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: <1703683819.8b167b0adffac5bdf1d7e43f2ca3da5f8d604b33.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/depgraph.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8b167b0adffac5bdf1d7e43f2ca3da5f8d604b33 X-VCS-Branch: master Date: Wed, 27 Dec 2023 13:30:57 +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: a8f093b8-cef6-49c3-92e7-5c9e1307e19b X-Archives-Hash: 4f4a6109ef7de2c8755b0fc6ec328736 commit: 8b167b0adffac5bdf1d7e43f2ca3da5f8d604b33 Author: Eli Schwartz gmail com> AuthorDate: Wed Dec 27 02:12:03 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Dec 27 13:30:19 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b167b0a emerge: enable "avoid spamming too much info about unused binpkgs" again In commit a6853d5493b7bed37e60c2e3b7536b209500ba3f this code in _show_ignored_binaries_respect_use was refactored to handle pkg.root. But it was refactored incorrectly -- the storage/lookup key started off as: ``` seen[pkg.cpv] ``` and was refactored so the storage key was: ``` seen[pkg.root][pkg.cpv] ``` and the lookup key was ``` seen[(pkg.root, pkg.cpv)] ``` As a result, we never detected a previously seen USE flags combo, and the logic to avoid spamming too much info was a no-op; the info was spammed, instead. Note that even though we have more code than before this patch, we actually have less code. The black code formatter decided that since the line length was decreased, this entire code block should be reformatted, murdering the diff view and dividing less code across *more* lines. This is not my fault and I refuse to be held accountable for it -- if you git blame this and do not know what happened, understand that it happens despite my objections. Signed-off-by: Eli Schwartz gmail.com> Closes: https://github.com/gentoo/portage/pull/1219 Signed-off-by: Sam James gentoo.org> lib/_emerge/depgraph.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 6ee4471bbe..efe084a780 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -1256,9 +1256,10 @@ class depgraph: # We don't want to list the same USE flags for multiple build IDs seen.setdefault(pkg.root, dict()) - if (pkg.root, pkg.cpv) not in seen or flag_display not in seen[pkg.root][ - pkg.cpv - ]: + if ( + pkg.cpv not in seen[pkg.root] + or flag_display not in seen[pkg.root][pkg.cpv] + ): seen[pkg.root].setdefault(pkg.cpv, set()).add(flag_display) # The user can paste this line into package.use messages.append(f" ={pkg.cpv} {flag_display}")