--- /usr/bin/equery 2005-05-05 06:11:52.000000000 +0000 +++ bin/equery-edit1 2005-05-07 02:11:19.000000000 +0000 @@ -872,7 +872,9 @@ """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": True + } def parseArgs(self, args): @@ -891,6 +893,8 @@ if x in ["-h","--help"]: need_help = 1 break + elif x in ["-m","--exclude-masked"]: + opts["includeMasked"] = False else: query = x @@ -903,21 +907,27 @@ 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: print_info(0, os.path.normpath(matches[-1].get_ebuild_path())) else: - print_error("No masked or unmasked packages found for " + pp.pkgquery(query)) + if opts["includeMasked"]: + print_error("No masked or unmasked packages found for " + pp.pkgquery(query)) + else: + print_error("No unmasked packages found for " + pp.pkgquery(query)) def shortHelp(self): - return pp.pkgquery("pkgspec") + " - print full path to ebuild for package " + pp.pkgquery("pkgspec") + return pp.localoption(" ") + pp.pkgquery("pkgspec") + " - print full path to ebuild for package " + pp.pkgquery("pkgspec") def longHelp(self): return "Print full path to ebuild for a given package" + \ "\n" + \ "Syntax:\n" + \ - " " + pp.command("which ") + pp.pkgquery("pkgspec") + " " + pp.command("which") + pp.localoption(" ") + pp.pkgquery("pkgspec") + \ + "\n" + \ + pp.localoption("") + " is either of: \n" + \ + " " + pp.localoption("-m, --nomasked") + " - exclude masked packages\n" class CmdListGLSAs(Command): """List outstanding GLSAs."""