commit: a6853d5493b7bed37e60c2e3b7536b209500ba3f Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Nov 2 13:59:05 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Nov 6 15:57:56 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a6853d54
emerge: account for EROOT in _show_ignored_binaries_respect_use Zac suggested this when reviewing the fix for bug #916336. Bug: https://bugs.gentoo.org/916336 Signed-off-by: Sam James <sam <AT> gentoo.org> lib/_emerge/depgraph.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 0717e0429f..d1fed0d652 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -1235,23 +1235,28 @@ class depgraph: seen = {} messages = [] merging = { - pkg.cpv + (pkg.root, pkg.cpv) for pkg in self._dynamic_config._displayed_list if isinstance(pkg, Package) } for pkg, flags in respect_use.items(): # Don't include recursive deps which aren't in the merge list anyway. - if pkg.cpv not in merging: + if (pkg.root, pkg.cpv) not in merging: continue + flag_display = [] for flag in sorted(flags): if flag not in pkg.use.enabled: flag = "-" + flag flag_display.append(flag) flag_display = " ".join(flag_display) + # We don't want to list the same USE flags for multiple build IDs - if pkg.cpv not in seen or flag_display not in seen[pkg.cpv]: - seen.setdefault(pkg.cpv, set()).add(flag_display) + seen.setdefault(pkg.root, dict()) + if (pkg.root, pkg.cpv) not in seen 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}") if pkg.root_config.settings["ROOT"] != "/":
