Inside display_preserved_libs(), filter out any consumers that belong to the
authorZac Medico <zmedico@gentoo.org>
Mon, 15 Dec 2008 22:45:21 +0000 (22:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 15 Dec 2008 22:45:21 +0000 (22:45 -0000)
same package as the provider.

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

pym/_emerge/__init__.py

index a94f2176785f01ee3216416f323720a4b9df7f68..07e8941a829bc9c9affa04198c4c246b7e2230ea 100644 (file)
@@ -11500,10 +11500,16 @@ def display_preserved_libs(vardbapi):
                else:
                        search_for_owners = set()
                        for cpv in plibdata:
+                               pkg_dblink = vardbapi._dblink(cpv)
                                for f in plibdata[cpv]:
                                        if f in consumer_map:
                                                continue
-                                       consumers = list(linkmap.findConsumers(f))
+                                       consumers = []
+                                       for c in linkmap.findConsumers(f):
+                                               # Filter out any consumers that belong
+                                               # to the same package as the provider.
+                                               if not pkg_dblink.isowner(c, pkg_dblink.myroot):
+                                                       consumers.append(c)
                                        consumers.sort()
                                        consumer_map[f] = consumers
                                        search_for_owners.update(consumers[:MAX_DISPLAY+1])