Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 32708 Details for
Bug 53058
app-portage/gentoolkit - Please add GraphViz output to equery depgraph.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for graphviz output in equery depgraph
equery-dot.patch (text/plain), 2.30 KB, created by
Michael Mai
on 2004-06-05 06:57:29 UTC
(
hide
)
Description:
patch for graphviz output in equery depgraph
Filename:
MIME Type:
Creator:
Michael Mai
Created:
2004-06-05 06:57:29 UTC
Size:
2.30 KB
patch
obsolete
>--- equery 2004-06-05 15:46:01.361281808 +0200 >+++ equery-modified 2004-06-05 15:45:33.894457400 +0200 >@@ -400,7 +400,8 @@ > def __init__(self): > self.default_opts = { > "displayUSEFlags": 1, >- "fancyFormatting": 1 >+ "fancyFormatting": 1, >+ "dotformat": 0 > } > > def parseArgs(self, args): >@@ -424,6 +425,8 @@ > opts["displayUSEFlags"] = 0 > elif x in ["-l","--linear"]: > opts["fancyFormatting"] = 0 >+ elif x in ["-d","--dotformat"]: >+ opts["dotformat"] = 1 > else: > query = x > >@@ -440,21 +443,38 @@ > > for pkg in matches: > >- if Config["verbosityLevel"] >= 3: >+ if (Config["verbosityLevel"] >= 3) and (not opts["dotformat"]): > print "Displaying dependencies for " + pkg.get_cpv() + "\n" > > if not pkg.is_installed(): > continue >- self._graph(pkg, opts) > >- def _graph(self, pkg, opts, level=0,pkgtbl=[],suffix=""): >+ if opts["dotformat"]: >+ print "digraph {" >+ pkgtbl=[] >+ >+ self._graph(pkg, opts, 0, pkgtbl) >+ >+ if opts["dotformat"]: >+ print >+ for p in pkgtbl: >+ print "\t%-12i [label=\"%s\"]" % ( hash( p ), p ) >+ print "}" >+ >+ def _graph(self, pkg, opts, level=0, pkgtbl=[], suffix="", from_pkg=""): > > cpv=pkg.get_cpv() >+ enter_cpv = cpv > > pfx = "" > if opts["fancyFormatting"]: > pfx = level*" " + "`-- " >- print pfx + cpv + suffix >+ >+ if opts["dotformat"]: >+ if from_pkg != "": >+ print "\t%-12i -> %i" % ( hash( from_pkg ), hash( cpv ) ) >+ else: >+ print pfx + cpv + suffix > > pkgtbl.append(cpv) > >@@ -470,7 +490,7 @@ > suffix += " (" + cpv + ")" > if len(x[1]) and opts["displayUSEFlags"]: > suffix += " [ " + string.join(x[1]) + " ]" >- pkgtbl = self._graph(pkg, opts, level+1, pkgtbl, suffix) >+ pkgtbl = self._graph(pkg, opts, level+1, pkgtbl, suffix, enter_cpv) > return pkgtbl > > def shortHelp(self): >@@ -483,7 +503,8 @@ > "\n" + \ > yellow("<local-opts>") + " is either of: \n" + \ > " " + yellow("-U, --no-useflags") + " - do not show USE flags\n" + \ >- " " + yellow("-l, --linear") + " - do not use fancy formatting" >+ " " + yellow("-l, --linear") + " - do not use fancy formatting\n" + \ >+ " " + yellow("-d, --dotformat") + " - print dependency in dot-format. Tip: pipe into display" > > class CmdDisplaySize(Command): > """Display disk size consumed by a package"""
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53058
: 32708 |
32716