|
Lines 214-220
Link Here
|
| 214 |
|
214 |
|
| 215 |
(query, opts) = self.parseArgs(args) |
215 |
(query, opts) = self.parseArgs(args) |
| 216 |
|
216 |
|
| 217 |
if not Config["piping"]: |
217 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 218 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
218 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
| 219 |
|
219 |
|
| 220 |
pkgs = gentoolkit.find_installed_packages(query, True) |
220 |
pkgs = gentoolkit.find_installed_packages(query, True) |
|
Lines 223-229
Link Here
|
| 223 |
if not x.is_installed(): |
223 |
if not x.is_installed(): |
| 224 |
continue |
224 |
continue |
| 225 |
|
225 |
|
| 226 |
print_info(1, pp.section("* ") + "Contents of " + pp.cpv(x.get_cpv()) + ":") |
226 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
|
|
227 |
print_info(1, pp.section("* ") + "Contents of " + pp.cpv(x.get_cpv()) + ":") |
| 227 |
|
228 |
|
| 228 |
cnt = self.filterContents(x.get_contents(),opts["filter"]) |
229 |
cnt = self.filterContents(x.get_contents(),opts["filter"]) |
| 229 |
|
230 |
|
|
Lines 329-335
Link Here
|
| 329 |
if cat != "*": |
330 |
if cat != "*": |
| 330 |
filter_fn = lambda x: x.find(cat+"/")==0 |
331 |
filter_fn = lambda x: x.find(cat+"/")==0 |
| 331 |
|
332 |
|
| 332 |
if not Config["piping"]: |
333 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 333 |
print_info(3, "[ Searching for file(s) " + pp.regexpquery(string.join(query,",")) + " in " + pp.cpv(cat) + "... ]") |
334 |
print_info(3, "[ Searching for file(s) " + pp.regexpquery(string.join(query,",")) + " in " + pp.cpv(cat) + "... ]") |
| 334 |
|
335 |
|
| 335 |
matches = portage.db["/"]["vartree"].dbapi.cpv_all() |
336 |
matches = portage.db["/"]["vartree"].dbapi.cpv_all() |
|
Lines 425-431
Link Here
|
| 425 |
|
426 |
|
| 426 |
(query, opts) = self.parseArgs(args) |
427 |
(query, opts) = self.parseArgs(args) |
| 427 |
|
428 |
|
| 428 |
if not Config["piping"]: |
429 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 429 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
430 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
| 430 |
|
431 |
|
| 431 |
matches = gentoolkit.find_packages(query, True) |
432 |
matches = gentoolkit.find_packages(query, True) |
|
Lines 468-474
Link Here
|
| 468 |
except IOError: |
469 |
except IOError: |
| 469 |
print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc")) |
470 |
print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc")) |
| 470 |
|
471 |
|
| 471 |
if not Config["piping"]: |
472 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 472 |
print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]") |
473 |
print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]") |
| 473 |
print_info(3, "[ Legend : Left column (U) - USE flags from make.conf ]") |
474 |
print_info(3, "[ Legend : Left column (U) - USE flags from make.conf ]") |
| 474 |
print_info(3, "[ : Right column (I) - USE flags packages was installed with ]") |
475 |
print_info(3, "[ : Right column (I) - USE flags packages was installed with ]") |
|
Lines 520-526
Link Here
|
| 520 |
|
521 |
|
| 521 |
# pretty print |
522 |
# pretty print |
| 522 |
if output: |
523 |
if output: |
| 523 |
if not Config["piping"]: |
524 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 524 |
print_info(0, "[ Found these USE variables for " + pp.cpv(bestver) + " ]") |
525 |
print_info(0, "[ Found these USE variables for " + pp.cpv(bestver) + " ]") |
| 525 |
print_info(3, pp.emph(" U I")) |
526 |
print_info(3, pp.emph(" U I")) |
| 526 |
maxflag_len = 0 |
527 |
maxflag_len = 0 |
|
Lines 612-618
Link Here
|
| 612 |
def perform(self, args): |
613 |
def perform(self, args): |
| 613 |
(query, opts) = self.parseArgs(args) |
614 |
(query, opts) = self.parseArgs(args) |
| 614 |
|
615 |
|
| 615 |
if not Config["piping"]: |
616 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 616 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
617 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
| 617 |
|
618 |
|
| 618 |
matches = gentoolkit.find_packages(query, True) |
619 |
matches = gentoolkit.find_packages(query, True) |
|
Lines 620-633
Link Here
|
| 620 |
for pkg in matches: |
621 |
for pkg in matches: |
| 621 |
if not pkg.is_installed(): |
622 |
if not pkg.is_installed(): |
| 622 |
continue |
623 |
continue |
| 623 |
if Config["piping"]: |
624 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 624 |
print_info(0, pkg.get_cpv() + ":") |
|
|
| 625 |
else: |
| 626 |
print_info(3, pp.section("* ") + "dependency graph for " + pp.cpv(pkg.get_cpv())) |
625 |
print_info(3, pp.section("* ") + "dependency graph for " + pp.cpv(pkg.get_cpv())) |
|
|
626 |
else: |
| 627 |
print_info(0, pkg.get_cpv() + ":") |
| 627 |
|
628 |
|
| 628 |
stats = { "maxdepth": 0, "packages": 0 } |
629 |
stats = { "maxdepth": 0, "packages": 0 } |
| 629 |
self._graph(pkg, opts, stats) |
630 |
self._graph(pkg, opts, stats) |
| 630 |
print_info(0, "[ " + pp.cpv(pkg.get_cpv()) + " stats: packages (" + pp.number(str(stats["packages"])) + \ |
631 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
|
|
632 |
print_info(0, "[ " + pp.cpv(pkg.get_cpv()) + " stats: packages (" + pp.number(str(stats["packages"])) + \ |
| 631 |
"), max depth (" + pp.number(str(stats["maxdepth"])) + ") ]") |
633 |
"), max depth (" + pp.number(str(stats["maxdepth"])) + ") ]") |
| 632 |
|
634 |
|
| 633 |
def _graph(self, pkg, opts, stats, level=0, pkgtbl=[], suffix=""): |
635 |
def _graph(self, pkg, opts, stats, level=0, pkgtbl=[], suffix=""): |
|
Lines 709-715
Link Here
|
| 709 |
def perform(self, args): |
711 |
def perform(self, args): |
| 710 |
(query, opts) = self.parseArgs(args) |
712 |
(query, opts) = self.parseArgs(args) |
| 711 |
|
713 |
|
| 712 |
if not Config["piping"]: |
714 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 713 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
715 |
print_info(3, "[ Searching for packages matching " + pp.pkgquery(query) + "... ]") |
| 714 |
|
716 |
|
| 715 |
matches = gentoolkit.find_packages(query, True) |
717 |
matches = gentoolkit.find_packages(query, True) |
|
Lines 803-812
Link Here
|
| 803 |
for pkg in matches: |
805 |
for pkg in matches: |
| 804 |
if not pkg.is_installed(): |
806 |
if not pkg.is_installed(): |
| 805 |
continue |
807 |
continue |
| 806 |
if Config["piping"]: |
808 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 807 |
print_info(0, pkg.get_cpv() + ":") |
|
|
| 808 |
else: |
| 809 |
print_info(1, "[ Checking " + pp.cpv(pkg.get_cpv()) + " ]") |
809 |
print_info(1, "[ Checking " + pp.cpv(pkg.get_cpv()) + " ]") |
|
|
810 |
else: |
| 811 |
print_info(0, pkg.get_cpv() + ":") |
| 810 |
|
812 |
|
| 811 |
files = pkg.get_contents() |
813 |
files = pkg.get_contents() |
| 812 |
checked_files = 0 |
814 |
checked_files = 0 |
|
Lines 987-993
Link Here
|
| 987 |
|
989 |
|
| 988 |
(query, opts) = self.parseArgs(args) |
990 |
(query, opts) = self.parseArgs(args) |
| 989 |
|
991 |
|
| 990 |
if not Config["piping"]: |
992 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 991 |
print_info(3, "[ Searching for packages depending on " + pp.pkgquery(query) + "... ]") |
993 |
print_info(3, "[ Searching for packages depending on " + pp.pkgquery(query) + "... ]") |
| 992 |
|
994 |
|
| 993 |
isdepend = gentoolkit.split_package_name(query) |
995 |
isdepend = gentoolkit.split_package_name(query) |
|
Lines 1170-1176
Link Here
|
| 1170 |
sname = "package '" + name + "'" |
1172 |
sname = "package '" + name + "'" |
| 1171 |
if name == ".*": |
1173 |
if name == ".*": |
| 1172 |
sname = "all packages" |
1174 |
sname = "all packages" |
| 1173 |
if not Config["piping"]: |
1175 |
if not Config["piping"] and Config["verbosityLevel"] >= 3: |
| 1174 |
print_info(1, "[ Searching for " + pp.cpv(sname) + " in " + pp.cpv(scat) + " among: ]") |
1176 |
print_info(1, "[ Searching for " + pp.cpv(sname) + " in " + pp.cpv(scat) + " among: ]") |
| 1175 |
|
1177 |
|
| 1176 |
|
1178 |
|