display_preserved_libs: load plib_registry
authorZac Medico <zmedico@gentoo.org>
Thu, 28 Apr 2011 21:07:08 +0000 (14:07 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 28 Apr 2011 21:07:08 +0000 (14:07 -0700)
Since commit 7535cabdf2fab76fc55df83643157613dfd66be9, the
plib_registry is modified in a subprocess, and the parent
process' copy can become stale because of this. Therefore,
explicitly load it.

pym/_emerge/main.py

index 82b1444c5c8b64eb419856948fa4eabc0ed747cb..e0cd0c024307c03d60b131b8cf30220de374b694 100644 (file)
@@ -217,7 +217,9 @@ def display_preserved_libs(vardbapi, myopts):
                # preserve-libs is entirely disabled
                return
 
-       # Ensure the registry is consistent with existing files.
+       # Explicitly load and prune the PreservedLibsRegistry in order
+       # to ensure that we do not display stale data.
+       vardbapi._plib_registry.load()
        vardbapi._plib_registry.pruneNonExisting()
 
        if vardbapi._plib_registry.hasEntries():