From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/, lib/_emerge/resolver/
Date: Sun, 15 Dec 2019 06:48:56 +0000 (UTC) [thread overview]
Message-ID: <1576391246.463b2d36f3d95760e48543f1f30410aa76267538.zmedico@gentoo> (raw)
commit: 463b2d36f3d95760e48543f1f30410aa76267538
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 05:30:13 2019 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 06:27:26 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=463b2d36
emerge: Show package USE in conflict messages
Bug: https://bugs.gentoo.org/310009
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/_emerge/depgraph.py | 26 +++++++++++++++++++++-----
lib/_emerge/resolver/slot_collision.py | 17 +++++++++++++----
2 files changed, 34 insertions(+), 9 deletions(-)
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 02e0e075d..1a5448c8f 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -1285,7 +1285,10 @@ class depgraph(object):
msg.append("\n\n")
msg.append(indent)
- msg.append(str(pkg))
+ msg.append("%s %s" % (pkg,
+ pkg_use_display(pkg,
+ self._frozen_config.myopts,
+ modified_use=self._pkg_use_enabled(pkg))))
msg.append(" conflicts with\n")
for parent, atom in parent_atoms:
@@ -1302,8 +1305,15 @@ class depgraph(object):
atom, marker = format_unmatched_atom(
pkg, atom, self._pkg_use_enabled)
+ if isinstance(parent, Package):
+ use_display = pkg_use_display(parent,
+ self._frozen_config.myopts,
+ modified_use=self._pkg_use_enabled(parent))
+ else:
+ use_display = ""
+
msg.append(2*indent)
- msg.append("%s required by %s\n" % (atom, parent))
+ msg.append("%s required by %s %s\n" % (atom, parent, use_display))
msg.append(2*indent)
msg.append(marker)
msg.append("\n")
@@ -8472,14 +8482,20 @@ class depgraph(object):
else:
# Display the specific atom from SetArg or
# Package types.
+ if isinstance(parent, Package):
+ use_display = pkg_use_display(parent,
+ self._frozen_config.myopts,
+ modified_use=self._pkg_use_enabled(parent))
+ else:
+ use_display = ""
if atom.package and atom != atom.unevaluated_atom:
# Show the unevaluated atom, since it can reveal
# issues with conditional use-flags missing
# from IUSE.
- msg.append("%s (%s) required by %s" %
- (atom.unevaluated_atom, atom, parent))
+ msg.append("%s (%s) required by %s %s" %
+ (atom.unevaluated_atom, atom, parent, use_display))
else:
- msg.append("%s required by %s" % (atom, parent))
+ msg.append("%s required by %s %s" % (atom, parent, use_display))
msg.append("\n")
msg.append("\n")
diff --git a/lib/_emerge/resolver/slot_collision.py b/lib/_emerge/resolver/slot_collision.py
index f676b38c8..682a3a0a5 100644
--- a/lib/_emerge/resolver/slot_collision.py
+++ b/lib/_emerge/resolver/slot_collision.py
@@ -9,6 +9,7 @@ from portage import _encodings, _unicode_encode
from _emerge.AtomArg import AtomArg
from _emerge.Package import Package
from _emerge.PackageArg import PackageArg
+from _emerge.UseFlagDisplay import pkg_use_display
from portage.dep import check_required_use
from portage.output import colorize
from portage._sets.base import InternalPackageSet
@@ -260,7 +261,9 @@ class slot_conflict_handler(object):
for pkg in pkgs:
msg.append(indent)
- msg.append("%s" % (pkg,))
+ msg.append("%s %s" % (pkg, pkg_use_display(pkg,
+ self.depgraph._frozen_config.myopts,
+ modified_use=self.depgraph._pkg_use_enabled(pkg))))
parent_atoms = self.all_parents.get(pkg)
if parent_atoms:
#Create a list of collision reasons and map them to sets
@@ -569,9 +572,15 @@ class slot_conflict_handler(object):
ordered_list.append(parent_atom)
for parent_atom in ordered_list:
parent, atom = parent_atom
+ if isinstance(parent, Package):
+ use_display = pkg_use_display(parent,
+ self.depgraph._frozen_config.myopts,
+ modified_use=self.depgraph._pkg_use_enabled(parent))
+ else:
+ use_display = ""
if atom.soname:
- msg.append("%s required by %s\n" %
- (atom, parent))
+ msg.append("%s required by %s %s\n" %
+ (atom, parent, use_display))
elif isinstance(parent, PackageArg):
# For PackageArg it's
# redundant to display the atom attribute.
@@ -602,7 +611,7 @@ class slot_conflict_handler(object):
if version_violated or slot_violated:
self.is_a_version_conflict = True
- cur_line = "%s required by %s\n" % (atom_str, parent)
+ cur_line = "%s required by %s %s\n" % (atom_str, parent, use_display)
marker_line = ""
for ii in range(len(cur_line)):
if ii in colored_idx:
next reply other threads:[~2019-12-15 6:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-15 6:48 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-30 23:30 [gentoo-commits] proj/portage:master commit in: lib/_emerge/, lib/_emerge/resolver/ Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576391246.463b2d36f3d95760e48543f1f30410aa76267538.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox