When --depclean pulls in the provider of a library because of installed
authorZac Medico <zmedico@gentoo.org>
Wed, 14 Oct 2009 05:07:03 +0000 (05:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 14 Oct 2009 05:07:03 +0000 (05:07 -0000)
consumers, display the soname(s) of the consumed libraries.

svn path=/main/trunk/; revision=14599

pym/_emerge/actions.py

index 9788c08577dc83c2d85dff5063efae706a4978f6..78d4779451fad64401073b569c96e56bc094bd01 100644 (file)
@@ -1032,13 +1032,20 @@ def calc_depclean(settings, trees, ldpath_mtimes,
                        msg = []
                        for pkg in sorted(consumer_map, key=cmp_sort_key(cmp_pkg_cpv)):
                                consumers = consumer_map[pkg]
+                               consumer_libs = {}
+                               for lib, lib_consumers in consumers.items():
+                                       for consumer in lib_consumers:
+                                               consumer_libs.setdefault(
+                                                       consumer.mycpv, set()).add(linkmap.getSoname(lib))
                                unique_consumers = set(chain(*consumers.values()))
                                unique_consumers = sorted(consumer.mycpv \
                                        for consumer in unique_consumers)
                                msg.append("")
                                msg.append("  %s pulled in by:" % (pkg.cpv,))
                                for consumer in unique_consumers:
-                                       msg.append("    %s" % (consumer,))
+                                       libs = consumer_libs[consumer]
+                                       msg.append("    %s needs %s" % \
+                                               (consumer, ', '.join(sorted(libs))))
                        msg.append("")
                        writemsg_level("".join(prefix + "%s\n" % line for line in msg),
                                level=logging.WARNING, noiselevel=-1)