From d90c021148887561925717113e0da6bb2aa429a9 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 22 Sep 2005 20:36:12 +0000 Subject: [PATCH] Change 'equery which' to return best-visible ebuild path Bug #78687, Sort output from 'equery list' Bug #67152 svn path=/; revision=239 --- trunk/src/equery/equery | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 3bcdb3d..23ca6e3 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -891,7 +891,9 @@ class CmdWhich(Command): """Display the filename of the ebuild for a given package that would be used by Portage with the current configuration.""" def __init__(self): - self.default_opts = {} + self.default_opts = { + "includeMasked": False + } def parseArgs(self, args): @@ -910,6 +912,8 @@ class CmdWhich(Command): if x in ["-h","--help"]: need_help = 1 break + elif x in ["-m", "--include-masked"]: + opts["includeMasked"] = True else: query = x @@ -922,7 +926,7 @@ class CmdWhich(Command): def perform(self, args): (query, opts) = self.parseArgs(args) - matches = gentoolkit.find_packages(query, True) + matches = gentoolkit.find_packages(query, opts["includeMasked"]) matches = gentoolkit.sort_package_list(matches) if matches: @@ -933,6 +937,7 @@ class CmdWhich(Command): def shortHelp(self): return pp.pkgquery("pkgspec") + " - print full path to ebuild for package " + pp.pkgquery("pkgspec") def longHelp(self): + # Not documenting --include-masked at this time, since I'm not sure that it is needed. - FuzzyRay return "Print full path to ebuild for a given package" + \ "\n" + \ "Syntax:\n" + \ @@ -1201,6 +1206,7 @@ class CmdListPackages(Command): rx = re.compile(cat + "/" + name + "-" + ver + "(-" + rev + ")?") matches = package_finder(filter_fn) + matches = gentoolkit.sort_package_list(matches) if opts["includeInstalled"]: self._print_installed(matches, rx) -- 2.26.2