aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2004-10-11 15:03:58 +0000
committerJason Stubbs <jstubbs@gentoo.org>2004-10-11 15:03:58 +0000
commit009ef2f8bb48a41a2718a927b212f2b152cf3efb (patch)
tree676f86100c60dcdbffccac76ccff1e002bb5f7c1 /bin/emerge
parentSHA1 shouldn't be in digest. (diff)
downloadportage-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.
Diffstat (limited to 'bin/emerge')
-rwxr-xr-xbin/emerge88
1 files changed, 50 insertions, 38 deletions
diff --git a/bin/emerge b/bin/emerge
index 781d95c..2eba3e4 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -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 """