diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2004-10-11 15:03:58 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2004-10-11 15:03:58 +0000 |
commit | 009ef2f8bb48a41a2718a927b212f2b152cf3efb (patch) | |
tree | 676f86100c60dcdbffccac76ccff1e002bb5f7c1 | |
parent | SHA1 shouldn't be in digest. (diff) | |
download | portage-cvs-009ef2f8bb48a41a2718a927b212f2b152cf3efb.tar.gz portage-cvs-009ef2f8bb48a41a2718a927b212f2b152cf3efb.tar.bz2 portage-cvs-009ef2f8bb48a41a2718a927b212f2b152cf3efb.zip |
Reverted back to previous command line option parsing implementation as
--search arguments were being mishandled.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | bin/emerge | 88 |
2 files changed, 54 insertions, 39 deletions
@@ -1,6 +1,6 @@ # ChangeLog for Portage; the Gentoo Linux ports system # Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Id: ChangeLog,v 1.784 2004/10/11 04:18:13 carpaski Exp $ +# $Id: ChangeLog,v 1.785 2004/10/11 15:03:57 jstubbs Exp $ MAJOR CHANGES in 2.0.51: 1. /var/cache/edb/virtuals is no longer used at all. It's calculated now. @@ -8,6 +8,9 @@ 3. /etc/portage/profile/virtuals is _USER_ configs only. + 11 Oct 2004; Jason Stubbs; <jstubbs@gentoo.org> emerge: Reverted back to + previous command line parsing code as --search options were being mishandled. + 11 Oct 2004; Nicholas Jones <carpaski@gentoo.org> portage.py: Fix for the SHA1 digest slipout and the exec missing/broken binary traceback. @@ -1,7 +1,7 @@ #!/usr/bin/python -O # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.339 2004/10/11 04:01:00 jstubbs Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/emerge,v 1.340 2004/10/11 15:03:58 jstubbs Exp $ import os,sys os.environ["PORTAGE_CALLER"]="emerge" @@ -141,7 +141,7 @@ params=["selective", "deep", "self", "recurse", "empty"] actions=[ "clean", "config", "depclean", "info", "inject", "metadata", -"prune", "regen", "search", +"prune", "regen", "rsync", "search", "sync", "system", "unmerge", "world", ] options=[ @@ -216,43 +216,55 @@ for x in tmpcmdline: # process the options and command arguments for x in cmdline: - if not x: - continue - if len(x)>=2 and x[:2]=="--": - if x[2:]=="rsync": - x="--sync" - print - print red("*** '--rsync' has been deprecated.") - print red("*** Please use '--sync' instead.") - print - x = x[2:] - if "--"+x not in options and x not in actions: - print "!!! Error:",x,"is an invalid option." - sys.exit(1) - - if "--"+x in options: - myopts.append("--"+x) - elif x in actions: - if myaction: - if myaction not in ["system", "world"]: - myaction="--"+myaction - print - print red("!!!")+green(" Multiple actions requested... Please choose one only.") - print red("!!!")+" '"+darkgreen(myaction)+"' "+red("or")+" '"+darkgreen(x)+"'" - print - sys.exit(1) - myaction = x - elif x[-1]=="/": - # this little conditional helps tab completion - myfiles.append(x[:-1]) - else: - myfiles.append(x) + if not x: + continue + if len(x)>=2 and x[0:2]=="--": + if x in options: + myopts.append(x) + elif x[2:] in actions: + if x[2:]=="rsync" or x=="rsync": + # "emerge --rsync" + print + print red("*** '--rsync' has been deprecated.") + print red("*** Please use '--sync' instead.") + print + x="--sync" + if myaction: + if myaction not in ["system", "world"]: + myaction="--"+myaction + print + print red("!!!")+green(" Multiple actions requested... Please choose one only.") + print red("!!!")+" '"+darkgreen(myaction)+"' "+red("or")+" '"+darkgreen(x)+"'" + print + sys.exit(1) + myaction=x[2:] + else: + print "!!! Error:",x,"is an invalid option." + sys.exit(1) + elif (not myaction) and (x in actions): + if x not in ["system", "world"]: + #print red("*** Deprecated use of action '"+x+"'") + if x=="rsync": + # "emerge rsync" + print + print red("*** 'rsync' will now install the package rsync.") + print red("*** To sync the tree, please use '--sync' instead.") + print + myfiles.append(x) + continue + if myaction: + print + print red("!!!")+green(" Multiple actions requested... Please choose one only.") + print red("!!! '")+darkgreen(myaction)+"' "+red("or")+" '"+darkgreen(x)+"'" + print + sys.exit(1) + myaction=x + elif x[-1]=="/": + # this little conditional helps tab completion + myfiles.append(x[:-1]) + else: + myfiles.append(x) -if "rsync" in myfiles: - print - print red("*** 'emerge rsync' will now emerge the rsync package.") - print red("*** Please use '--sync' to update the portage tree.") - print if "moo" in myfiles: print """ |