Merged from trunk 5789:5791
authorFabian Groffen <grobian@gentoo.org>
Sun, 28 Jan 2007 17:46:43 +0000 (17:46 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 28 Jan 2007 17:46:43 +0000 (17:46 -0000)
For consistency, do not imply --pretend with --changelog since that
prevents --changelog from being usable in EMERGE_DEFAULTS_OPTS.
Thanks to Ryan Hill <dirtyepic@gentoo.org> in #151250.

if requested argv cannot be matched to anything, exit with non-zero
status (SpankMan)

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

bin/emerge
bin/portageq

index 877cb1cfcbd26791c3367b1ec723acb984500dcb..f255ec907a421e30803e93b48548351ab7a0b517 100755 (executable)
@@ -5186,11 +5186,6 @@ def emerge_main():
        if ("--usepkgonly" in myopts) and not ("--usepkg" in myopts):
                myopts["--usepkg"] = True
 
-       # Also allow -l to apply --pretend/-p, but if already in --ask mode
-       if ("--changelog" in myopts) and not (("--pretend" in myopts) or ("--ask" in myopts)):
-               print ">>> --changelog implies --pretend... adding --pretend to options."
-               myopts["--pretend"] = True
-
        # Allow -p to remove --ask
        if ("--pretend" in myopts) and ("--ask" in myopts):
                print ">>> --pretend disables --ask... removing --ask from options."
index c318365db8a6edea9066afa7597a27188ef20d2e..5d1c9990213a6caf5c6bc7b30e183c49bd1ef90d 100755 (executable)
@@ -133,7 +133,12 @@ def best_visible(argv):
                sys.exit(2)
        try:
                mylist=portage.db[argv[0]]["porttree"].dbapi.match(argv[1])
-               print portage.best(mylist)
+               visible=portage.best(mylist)
+               if visible:
+                       print visible
+                       sys.exit(0)
+               else:
+                       sys.exit(1)
        except KeyError:
                sys.exit(1)
 best_visible.uses_root = True