By popular demand (including releng), revert the unmerge behavior change from bug...
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Jun 2006 01:17:51 +0000 (01:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Jun 2006 01:17:51 +0000 (01:17 -0000)
svn path=/main/branches/2.1/; revision=3549

bin/emerge

index 80eb2bb21111814be66cb88aebf15f164e696809..9561053f9aab2db9eb8b00ddc31f5cd6cce7fcb2 100755 (executable)
@@ -2216,7 +2216,7 @@ def unmerge_overlapping(pkg_key, myroot, mysettings, vartree):
                return 1
        return 0
 
-def unmerge(unmerge_action, unmerge_files):
+def unmerge(unmerge_action, unmerge_files, raise_on_missing=True):
        candidate_catpkgs=[]
        global_unmerge=0
 
@@ -2337,7 +2337,12 @@ def unmerge(unmerge_action, unmerge_files):
                        #add a "=" if missing
                        mymatch=localtree.dep_match("="+x)
                if not mymatch:
-                       raise portage_exception.PackageNotFound(x)
+                       if raise_on_missing:
+                               raise portage_exception.PackageNotFound(x)
+                       else:
+                               portage.writemsg("\n--- Couldn't find '%s' to %s.\n" % \
+                                       (x, unmerge_action), noiselevel=-1)
+                               continue
                mykey=portage.key_expand(portage.dep_getkey(mymatch[0]),portage.db["/"]["vartree"].dbapi)
                if not pkgmap.has_key(mykey):
                        pkgmap[mykey]={"protected":[], "selected":[], "omitted":[] }
@@ -3218,13 +3223,8 @@ elif "search"==myaction:
                                sys.exit(1)
                        searchinstance.output()
 elif "unmerge"==myaction or "prune"==myaction or "clean"==myaction:
-       try:
-               if 1==unmerge(myaction, myfiles):
-                       post_emerge()
-       except portage_exception.PackageNotFound, e:
-               portage.writemsg("--- Couldn't find %s to unmerge.\n" % str(e),
-                       noiselevel=-1)
-               sys.exit(1)
+       if 1 == unmerge(myaction, myfiles, raise_on_missing=False):
+               post_emerge()
 
 elif "depclean"==myaction:
        # Kill packages that aren't explicitly merged or are required as a