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
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."
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