Bug #243030 - In PreservedLibraryConsumerSet.load(), avoid rebuilding packages
authorZac Medico <zmedico@gentoo.org>
Sun, 9 Nov 2008 07:42:25 +0000 (07:42 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 9 Nov 2008 07:42:25 +0000 (07:42 -0000)
just because they contain preserved libs that happen to be consumers of other
preserved libs.

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

pym/portage/sets/libs.py

index b4165357562a69813faab6457137aa122933c51b..3722c846257cf11df1bad58a3a10a2a48620e74e 100644 (file)
@@ -27,7 +27,8 @@ class PreservedLibraryConsumerSet(LibraryConsumerSet):
                reg = self.dbapi.plib_registry
                consumers = set()
                if reg:
-                       for libs in reg.getPreservedLibs().values():
+                       plib_dict = reg.getPreservedLibs()
+                       for libs in plib_dict.itervalues():
                                for lib in libs:
                                        if self.debug:
                                                print lib
@@ -35,6 +36,10 @@ class PreservedLibraryConsumerSet(LibraryConsumerSet):
                                                        print "    ", x
                                                print "-"*40
                                        consumers.update(self.dbapi.linkmap.findConsumers(lib))
+                       # Don't rebuild packages just because they contain preserved
+                       # libs that happen to be consumers of other preserved libs.
+                       for libs in plib_dict.itervalues():
+                               consumers.difference_update(libs)
                else:
                        return
                if not consumers: