aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-12-26 21:12:03 -0500
committerSam James <sam@gentoo.org>2023-12-27 13:30:19 +0000
commit8b167b0adffac5bdf1d7e43f2ca3da5f8d604b33 (patch)
tree2240e504ec80a3e1ea0ae9a50d3048b6f3e5bc2f
parent_global_updates: Acquire global vardbapi lock (diff)
downloadportage-8b167b0a.tar.gz
portage-8b167b0a.tar.bz2
portage-8b167b0a.zip
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 <eschwartz93@gmail.com> Closes: https://github.com/gentoo/portage/pull/1219 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--lib/_emerge/depgraph.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 6ee4471bb..efe084a78 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}")