Merged from trunk 5020:5023
authorFabian Groffen <grobian@gentoo.org>
Mon, 13 Nov 2006 21:32:24 +0000 (21:32 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 13 Nov 2006 21:32:24 +0000 (21:32 -0000)
For bug #154921, prevent an IndexError when a + is in USE.

For bug #154919, when depclean is unable to resolve dependencies, notify
the user that it may be necessary to manually uninstalled packages that
no longer exist in the portage tree.

svn path=/main/branches/prefix/; revision=5025

bin/emerge
pym/portage.py

index d8553c630c39b76237d7a84a67022c7d6317bbd8..f87a67ac095cfedaca1f659ef91c5d3158b16d8c 100755 (executable)
@@ -3942,7 +3942,10 @@ def action_depclean(settings, trees, ldpath_mtimes,
                for atom in unresolveable:
                        print atom, "required by", " ".join(unresolveable[atom])
                print
-               print "Have you forgotten to run " + good("`emerge --update --deep world`") + " prior to depclean?"
+               print "Have you forgotten to run " + good("`emerge --update --newuse --deep world`") + " prior to"
+               print "depclean?  It may also be necessary to manually uninstalled packages that no"
+               print "longer exist in the portage tree since it may not be possible to satisfy their"
+               print "dependencies."
                print
                return
 
index 4465df73dc9ab513107e412bc95cee03fbdc25e4..aa21cc37c183f298144d9136e79bb3624f40d233 100644 (file)
@@ -1697,6 +1697,8 @@ class config:
                                                writemsg(red("USE flags should not start with a '+': %s\n" % x),
                                                        noiselevel=-1)
                                                x=x[1:]
+                                               if not x:
+                                                       continue
 
                                        if (x[0]=="-"):
                                                if (x[1:] in myflags):
@@ -1764,6 +1766,8 @@ class config:
                                        writemsg(colorize("BAD", "USE flags should not start " + \
                                                "with a '+': %s\n" % x), noiselevel=-1)
                                        x = x[1:]
+                                       if not x:
+                                               continue
 
                                if x[0] == "-":
                                        try: