diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-09-26 03:13:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-09-26 03:13:33 +0000 |
commit | 6a97ca3bfaa4621d00bb337a20af7c821dd09eee (patch) | |
tree | dedb9791e1f6ab1f9612ef30a8388c65648477cb | |
parent | eca0a3f56c8093b03794e1bd941de6b921246d4c (diff) | |
download | portage-6a97ca3bfaa4621d00bb337a20af7c821dd09eee.tar.gz portage-6a97ca3bfaa4621d00bb337a20af7c821dd09eee.tar.bz2 portage-6a97ca3bfaa4621d00bb337a20af7c821dd09eee.zip |
Add back code removed in r11553 and fix logic to avoid IndexError.v2.2_rc10
svn path=/main/trunk/; revision=11556
-rw-r--r-- | pym/_emerge/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index b93aba348..d68dd80a0 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -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" |