Add back code removed in r11553 and fix logic to avoid IndexError. v2.2_rc10
authorZac Medico <zmedico@gentoo.org>
Fri, 26 Sep 2008 03:13:33 +0000 (03:13 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 26 Sep 2008 03:13:33 +0000 (03:13 -0000)
svn path=/main/trunk/; revision=11556

pym/_emerge/__init__.py

index b93aba348079dcaeb7daa1017fcf488dd0571289..d68dd80a03d5fc61519fc2698289a1ad16e20cd3 100644 (file)
@@ -10893,7 +10893,11 @@ def display_preserved_libs(vardbapi):
                                owners = vardbapi._owners.getFileOwnerMap(consumers[:MAX_DISPLAY+2])
                                for c in consumers[:MAX_DISPLAY]:
                                        print colorize("WARN", " * ") + "     used by %s (%s)" % (c, ", ".join([x.mycpv for x in owners[c]]))
-                               if len(consumers) > MAX_DISPLAY:
+                               if len(consumers) == MAX_DISPLAY + 1:
+                                       print colorize("WARN", " * ") + "     used by %s (%s)" % \
+                                               (consumers[MAX_DISPLAY], ", ".join(
+                                               x.mycpv for x in owners[consumers[MAX_DISPLAY]]))
+                               elif len(consumers) > MAX_DISPLAY:
                                        print colorize("WARN", " * ") + "     used by %d other files" % (len(consumers) - MAX_DISPLAY)
                print "Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to rebuild packages using these libraries"