sys.exit(2)
first_run = True
+ got_match = False
for query in (Query(x) for x in queries):
if not first_run:
print()
match = query.find_best()
+ if match is None:
+ continue
+
+ got_match = True
changelog_path = os.path.join(match.package_path(), 'ChangeLog')
changelog = ChangeLog(changelog_path)
print_entries(changelog.entries_matching_atom(atom)[:end])
first_run = False
+
+ if not got_match:
+ sys.exit(1)
# vim: set ts=4 sw=4 tw=79:
#
dep_print = DependPrinter(verbose=CONFIG['verbose'])
+
first_run = True
+ got_match = False
for query in queries:
if not first_run:
print()
if CONFIG['verbose']:
print(" * These packages depend on %s:" % pp.emph(pkg.cpv))
- pkg.graph_reverse_depends(
+ if pkg.graph_reverse_depends(
pkgset=sorted(pkggetter(), key=CPV),
max_depth=QUERY_OPTS["max_depth"],
only_direct=QUERY_OPTS["only_direct"],
printer_fn=dep_print
- )
+ ):
+ got_match = True
first_run = False
+ if not got_match:
+ sys.exit(1)
+
# vim: set ts=4 sw=4 tw=79:
(" -o, --overlay-tree", "include overlays in search path"),
(" -p, --portage-tree", "include entire portage tree in search path"),
(" -F, --format=TMPL", "specify a custom output format"),
- (" TMPL",
+ (" TMPL",
"a format template using (see man page):")
)))
print(" " * 24, ', '.join(pp.emph(x) for x in FORMAT_TMPL_VARS))
useflags = [x.lstrip("+-") for x in pkg.environment("IUSE").split()]
except errors.GentoolkitFatalError:
# aux_get KeyError or other unexpected result
- return
+ return False
if query not in useflags:
- return
+ return False
if CONFIG['verbose']:
- pkgstr = PackageFormatter(
+ pkgstr = PackageFormatter(
pkg,
do_format=True,
custom_format=QUERY_OPTS["package_format"]
)
else:
- pkgstr = PackageFormatter(
+ pkgstr = PackageFormatter(
pkg,
do_format=False,
custom_format=QUERY_OPTS["package_format"]
not QUERY_OPTS["in_porttree"] and
not QUERY_OPTS["in_overlay"]):
if not 'I' in pkgstr.location:
- return
+ return False
if (QUERY_OPTS["in_porttree"] and
not QUERY_OPTS["in_overlay"]):
if not 'P' in pkgstr.location:
- return
+ return False
if (QUERY_OPTS["in_overlay"] and
not QUERY_OPTS["in_porttree"]):
if not 'O' in pkgstr.location:
- return
+ return False
pp.uprint(pkgstr)
+ return True
+
def parse_module_options(module_opts):
#
first_run = True
+ got_match = False
for query in queries:
if not first_run:
print()
pp.uprint(" * Searching for USE flag %s ... " % pp.emph(query))
for pkg in matches:
- display_useflags(query, pkg)
+ if display_useflags(query, pkg):
+ got_match = True
+
first_run = False
+ if not got_match:
+ sys.exit(1)
+
# vim: set ts=4 sw=4 tw=79: