+2007-04-10: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Change equery uses to command to display the best matching
+ uninstalled package version if an uninstalled package is specified.
+ Changed the meaning of -a to mean display all versions. (Bug #152325)
+
2007-04-01: Alec Warner <antarus@gentoo.org>
* eread: Fix path and fully qualified paths (Bug #172969)
"""Advanced report of a package's USE flags"""
def __init__(self):
self.default_opts = {
- "installedOnly" : True
+ "allPackages" : False
}
def parseArgs(self, args):
need_help = 1
break
elif x in ["-a", "--all"]:
- opts["installedOnly"] = False
+ opts["allPackages"] = True
else:
query = x
if not Config["piping"] and Config["verbosityLevel"] >= 3:
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]")
- if opts["installedOnly"]:
+ if not opts["allPackages"]:
matches = gentoolkit.find_installed_packages(query, True)
+ if not matches:
+ matches = gentoolkit.find_packages(query, False)
+ if matches:
+ matches = gentoolkit.sort_package_list(matches)
+ matches = matches[-1:]
else:
matches = gentoolkit.find_packages(query, True)
print_info(3, "[ : Right column (I) - USE flags packages was installed with ]")
# Iterate through matches, printing a report for each package
+ matches = gentoolkit.sort_package_list(matches)
matches_found = 0
for p in matches:
- if not p.is_installed() and opts["installedOnly"]:
- continue
-
matches_found += 1
bestver = p.get_cpv()
if Config["verbosityLevel"] >= 2:
if matches_found == 0:
s = ""
- if opts["installedOnly"]:
- s = "installed "
die(3, "No " + s + "packages found for " + pp.pkgquery(query))
" " + pp.command("uses") + pp.localoption(" <local-opts> ") + pp.pkgquery("pkgspec") + \
"\n" + \
pp.localoption("<local-opts>") + " is: \n" + \
- " " + pp.localoption("-a, --all") + " - include non-installed packages\n"
+ " " + pp.localoption("-a, --all") + " - include all package versions\n"
class CmdDisplayDepGraph(Command):