Fix KeyError raised from display_preserved_libs() when the realpath is used
authorZac Medico <zmedico@gentoo.org>
Mon, 6 Oct 2008 02:47:37 +0000 (02:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 6 Oct 2008 02:47:37 +0000 (02:47 -0000)
as a key in consumer_map instead of the orignal path that was returned from
the PreservedLibsRegistry.

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

pym/_emerge/__init__.py

index 1add5ed5d9f34f8055668cc881eaf188acf78f76..910e518d93772b9d30d13e33410b3d321486301d 100644 (file)
@@ -10967,9 +10967,11 @@ def display_preserved_libs(vardbapi):
                                        samefile_map[real_path] = alt_paths
                                alt_paths.add(f)
 
-                       for f, alt_paths in samefile_map.iteritems():
-                               for p in sorted(alt_paths):
+                       for alt_paths in samefile_map.itervalues():
+                               alt_paths = sorted(alt_paths)
+                               for p in alt_paths:
                                        print colorize("WARN", " * ") + " - %s" % (p,)
+                               f = alt_paths[0]
                                consumers = consumer_map[f]
                                for c in consumers[:MAX_DISPLAY]:
                                        print colorize("WARN", " * ") + "     used by %s (%s)" % \