+2007-03-10 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Add --depth option to equery depgraph to limit the depth of
+ the dependency graph. (Bug #115807)
+
2007-03-09 Paul Varner <fuzzyray@gentoo.org>
* revdep-rebuild: Add support to detect "no version information
available" message from ldd (Bug #169973)
def __init__(self):
self.default_opts = {
"displayUSEFlags": 1,
- "fancyFormatting": 1
+ "fancyFormatting": 1,
+ "depth": 0
}
def parseArgs(self, args):
opts["displayUSEFlags"] = 0
elif x in ["-l","--linear"]:
opts["fancyFormatting"] = 0
+ elif x[:8] == "--depth=":
+ opts["depth"] = int(x[8:])
else:
query = x
suffix += " (" + pp.cpv(cpv) + ")"
if len(x[1]) and opts["displayUSEFlags"]:
suffix += " [ " + pp.useflagon(string.join(x[1])) + " ]"
- pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix)
+ if (level < opts["depth"] or opts["depth"] <= 0):
+ pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix)
return pkgtbl
def shortHelp(self):
"\n" + \
pp.localoption("<local-opts>") + " is either of: \n" + \
" " + pp.localoption("-U, --no-useflags") + " - do not show USE flags\n" + \
- " " + pp.localoption("-l, --linear") + " - do not use fancy formatting"
+ " " + pp.localoption("-l, --linear") + " - do not use fancy formatting\n" + \
+ " " + pp.localoption(" --depth=n") + " - limit dependency graph to specified depth"
+
class CmdDisplaySize(Command):
"""Display disk size consumed by a package"""
" " + 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("--depth=x") + " - limit indirect dependency tree to specified depth"
+ " " + pp.localoption("--depth=n") + " - limit indirect dependency tree to specified depth"
class CmdListPackages(Command):
.br
.B \-l, \-\-linear
do not use fancy formatting
+.br
+.B \-\-depth=n
+Limit depth of dependency graph to n levels.
.PP
.TP
.B files <local\-opts> pkgspec
equery list \-\-duplicates \- list all installed slotted packages
.PP
-.TP
+.TP
.B size <local\-opts> pkgspec
This command outputs the number of files in the specified package, as well as
their total size in an appropriate unit.