public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH] calc_depclean: do not abort for broken soname dependencies (bug 563844)
Date: Thu, 22 Oct 2015 23:00:29 -0700	[thread overview]
Message-ID: <1445580029-27665-1-git-send-email-zmedico@gentoo.org> (raw)

X-Gentoo-Bug: 563844
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563844
---
 pym/_emerge/actions.py | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 602715b..7f1cb59 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -863,11 +863,31 @@ def calc_depclean(settings, trees, ldpath_mtimes,
 
 	def unresolved_deps():
 
+		soname_deps = set()
 		unresolvable = set()
 		for dep in resolver._dynamic_config._initially_unsatisfied_deps:
 			if isinstance(dep.parent, Package) and \
 				(dep.priority > UnmergeDepPriority.SOFT):
-				unresolvable.add((dep.atom, dep.parent.cpv))
+				if dep.atom.soname:
+					soname_deps.add((dep.atom, dep.parent.cpv))
+				else:
+					unresolvable.add((dep.atom, dep.parent.cpv))
+
+		if soname_deps:
+			# Generally, broken soname dependencies can safely be
+			# suppressed by a REQUIRES_EXCLUDE setting in the ebuild,
+			# so they should only trigger a warning message.
+			prefix = warn(" * ")
+			msg = []
+			msg.append("Broken soname dependencies found:")
+			msg.append("")
+			for atom, parent in soname_deps:
+				msg.append("  %s required by:" % (atom,))
+				msg.append("    %s" % (parent,))
+				msg.append("")
+
+			writemsg_level("".join("%s%s\n" % (prefix, line) for line in msg),
+				level=logging.WARNING, noiselevel=-1)
 
 		if not unresolvable:
 			return False
-- 
2.4.9



             reply	other threads:[~2015-10-23  6:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  6:00 Zac Medico [this message]
2015-10-23 10:31 ` [gentoo-portage-dev] [PATCH] calc_depclean: do not abort for broken soname dependencies (bug 563844) Alexander Berntsen

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=1445580029-27665-1-git-send-email-zmedico@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-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