Index: depends.py =================================================================== --- depends.py (revision 641) +++ depends.py (working copy) @@ -33,10 +33,8 @@ "includePortTree": False, "includeOverlayTree": False, "isRegex": False, "matchExact": True, "onlyDirect": True, - "onlyInstalled": True, "printMatchInfo": True, "indentLevel": 0, "depth": -1 } @@ -77,12 +75,11 @@ """Ensure that the package cache is set.""" if not pkg_cache: - if QUERY_OPTS["onlyInstalled"]: - # TODO: move away from using strings here - packages = get_installed_cpvs() + if QUERY_OPTS['includePortTree']: + packages = [Package(x) for x in get_cpvs()] else: - packages = get_cpvs() - packages.sort(compare_package_strings) + packages = [Package(x) for x in get_installed_cpvs()] + packages.sort() pkg_cache = packages else: packages = pkg_cache @@ -134,7 +131,7 @@ @param queries: packages to find the dependencies for """ - for pkg in [Package(x) for x in cache_package_list(pkg_cache)]: + for pkg in cache_package_list(pkg_cache): if not pkg.cpv in PKGDEPS: try: deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps() @@ -192,11 +189,11 @@ print_help() sys.exit(0) elif opt in ('-a', '--all-packages'): - QUERY_OPTS["onlyInstalled"] = False + QUERY_OPTS['includePortTree'] = True elif opt in ('-d', '--direct'): continue elif opt in ('-D', '--indirect'): QUERY_OPTS["onlyDirect"] = False elif opt in ('--depth'): if posarg.isdigit(): depth = int(posarg)