summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-21 00:43:50 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-21 00:43:50 +0000
commit564f0e2925956c2566e2911ee9d2ab2d7af7944c (patch)
tree7b4e1cedae67ef5e2f11a2a31f4a3b256c39a045
parent7ac080995a21b81c37d6860c3f69c6f24c09fc09 (diff)
downloadportage-564f0e2925956c2566e2911ee9d2ab2d7af7944c.tar.gz
portage-564f0e2925956c2566e2911ee9d2ab2d7af7944c.tar.bz2
portage-564f0e2925956c2566e2911ee9d2ab2d7af7944c.zip
By popular demand (including releng), revert the unmerge behavior change from bug #118515 (r3186).
svn path=/main/trunk/; revision=3548
-rwxr-xr-xbin/emerge18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/emerge b/bin/emerge
index dc8af7724..704ebfe3d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -2241,7 +2241,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
@@ -2362,7 +2362,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":[] }
@@ -3237,13 +3242,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