projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c1b8b
)
if requested argv cannot be matched to anything, exit with non-zero status
author
Mike Frysinger
<vapier@gentoo.org>
Sat, 27 Jan 2007 04:49:42 +0000
(
04:49
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Sat, 27 Jan 2007 04:49:42 +0000
(
04:49
-0000)
svn path=/main/trunk/; revision=5791
bin/portageq
patch
|
blob
|
history
diff --git
a/bin/portageq
b/bin/portageq
index c3adf9114fff4b00ff82aef80709d0063556d9c6..8a70bed8704d0dc98b68eee8c5de3e8bf726a33b 100755
(executable)
--- a/
bin/portageq
+++ b/
bin/portageq
@@
-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