public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] calc_depclean: do not abort for broken soname dependencies (bug 563844)
@ 2015-10-23  6:00 Zac Medico
  2015-10-23 10:31 ` Alexander Berntsen
  0 siblings, 1 reply; 2+ messages in thread
From: Zac Medico @ 2015-10-23  6:00 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-23 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23  6:00 [gentoo-portage-dev] [PATCH] calc_depclean: do not abort for broken soname dependencies (bug 563844) Zac Medico
2015-10-23 10:31 ` Alexander Berntsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox