+2004-10-17 Marius Mauch <genone@gentoo.org>
+ * equery: fix for bug #67473 (checking md5sums of prelinked binaries)
+ * equery: fix for bug #67275 (--nocolor didn't work as configure was
+ called before parsing the arguments
+ * equery: changed defaults for `equery depends` as making a depgraph
+ for the full portage tree isn't a good idea and find_all_packages()
+ uses way to much memory currently
+
2004-10-12 Marius Mauch <genone@gentoo.org>
* equery: fix for bug #67210
return (query, opts)
def getMD5sum(self, file):
- md5sum, filesize = portage_checksum.md5hash(file)
- return md5sum
+ return portage_checksum.perform_md5(file, calc_prelink=1)
def perform(self, args):
(query, opts) = self.parseArgs(args)
def __init__(self):
self.default_opts = {
"onlyDirect": 1,
- "onlyInstalled": 0
+ "onlyInstalled": 1
}
def parseArgs(self, args):
opts["onlyDirect"] = 1
elif x in ["-D", "--indirect"]:
opts["onlyDirect"] = 0
- elif x in ["-i", "--only-installed"]:
- opts["onlyInstalled"] = 1
+ elif x in ["-a", "--all-packages"]:
+ opts["onlyInstalled"] = 0
else:
query = x
if isdep:
subdeps(pkg.get_cpv(), spacing+" ")
-
(query, opts) = self.parseArgs(args)
-
+
if not Config["piping"]:
- print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]")
-
+ print_info(3, "[ Searching for packages depending on " + pp.pkgquery(query) + "... ]")
+
isdepend = gentoolkit.split_package_name(query)
-
if opts["onlyInstalled"]:
packages = gentoolkit.find_all_installed_packages()
else:
packages = gentoolkit.find_all_packages()
-
+
if not opts["onlyDirect"]:
print_info(4, "Caching indirect dependencies...")
depscache = {"":[]}
for pkg in packages:
-
print_info(1, pp.section("* ") + "Dependencies for " + pp.cpv(pkg.get_cpv()) + ":")
try:
" " + pp.command("depends") + pp.localoption(" <local-opts> ") + pp.pkgquery("pkgspec") + \
"\n" + \
pp.localoption("<local-opts>") + " is either of: \n" + \
+ " " + pp.localoption("-a, --all-packages") + " - search in all available packages (slow)\n" + \
" " + pp.localoption("-d, --direct") + " - search direct dependencies only (default)\n" + \
- " " + pp.localoption("-D, --indirect") + " - search indirect dependencies (VERY slow)\n" + \
- " " + pp.localoption("-i, --only-installed") + " - search installed in installed packages only\n"
+ " " + pp.localoption("-D, --indirect") + " - search indirect dependencies (VERY slow)\n"
class CmdListPackages(Command):
def configure():
"""Set up default configuration.
"""
-
+
# Guess colour output
if (Config["color"] == -1 and \
((not sys.stdout.isatty()) or \
printVersion()
sys.exit(0)
elif x in ["-C", "--nocolor"]:
- Config["color"] = False
+ Config["color"] = 0
elif x in ["-N", "--no-pipe"]:
Config["piping"] = False
elif x in ["-q","--quiet"]:
return (command, local_opts)
if __name__ == "__main__":
- configure()
(cmd, local_opts) = parseArgs(sys.argv[1:])
+ configure()
if cmd:
try:
cmd.perform(local_opts)