This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup.ini dependency graph?


On 11/4/2013 11:00 AM, Christopher Faylor wrote:
On Mon, Nov 04, 2013 at 09:32:10AM -0500, Charles Wilson wrote:
I've got a few cleanups, and then I'll share the result.  It's already
helped me generate a few re-packaging requests I plan to post over on
cygwin-apps...

Is this packagable?  It sounds pretty interesting.

Probably. I could put it in cygutils, or standalone (like the new cygcheck-leaves package is a standalone utility).

Would it be crazy to generate this and make it available on the cygwin
web site?  Or would the dependency graph generation overload
sourceware.org?

The basic processing to generate a .dot file is pretty simple really; just string comparisons and hash manipulations. But as Ryan already pointed out, generating the actual graph in whatever format, is probably compute intensive.

See attached...

The svg files in the tarball correspond to each of the --mode options. The tool was invoked as:
   setup-ini-graph -i setup.ini -o $dotfile --mode=$mode netpbm
followed by (on linux)
   dot -Tsvg $dotfile > $svgfile

Help output:
Usage:
    setup_ini_graph [options] [packagename [packagename ...]]

     Options:
       --help|-?                brief help message
       --man                    full documentation
       --version                show version information
       --mode STRING            specify the output mode. Possible values:
                                  strip-base-and-requirements <default>
                                  strip-base-only
                                  collapse-base-and-requirements
                                  collapse-base-only
                                  show-only-base-and-requirements
                                  show-base-requirements-only
                                  show-all
       --color STRING           set color of specified packages <lightblue>
       --color-req STRING       set color of package requirements <palegreen>
       --color-base STRING      set color of Base packages <plum>
       --color-base-req STRING  set color of Base requirements <pink>
       --input|-i FILE          specify input setup.ini file <STDIN>
       --output|-o FILE         specify output .dot file <STDOUT>
       --verbose                turn on debugging output

    If packagenames are specified, then only the specified packages and
    their dependencies are analyzed. If no packages are specified, then all
    packages in the setup.ini are analyzed.

Options:
    --help  Print a brief help message and exits.

    --man   Prints the manual page and exits.

    --version
            Prints version information and exits.

    --mode STRING
            Specify the output mode. The STRING may be one of the following
            options:

            strip-base-and-requirements
                All packages in the Base category, and packages on which
                they depend, are completely removed from the output. This is
                the default mode.

            strip-base-only
                All packages in the Base category are completely removed
                from the output.

            collapse-base-and-requirements
                All packages in the Base category, and packages on which
                they depend, are replaced by a single node 'Base'.

            collapse-base-only
                All packages in the Base category are replaced by a single
                node 'Base'.

            show-only-base-and-requirements
                Ignore all packages that are not in the Base category, or
                are not required by packages in the Base category.

            show-base-requirements-only
                As above, but the packages which are members of the Base
                category are replaced by a single node 'Base'.

            show-all
                Chart the entire dependency tree.

    --color STRING
            Sets the color to be used for nodes that represent the packages
            listed on the command line (or all packages extracted from
            setup.ini that do not fall into one of the other categories
            below). May be an RGB color name such as palegoldenrod, or an
            RGB triple of the form #DA70D6. Note that in the latter case,
            the # must be escaped as \#DA70D6 or '#DA70D6'. The default
            value is lightblue (#ADD8E6).

    --color-req STRING
            Sets the color to be used for nodes that represent packages that
            are required by the ones listed on the command line, but which
            do not fall into one of the other categories below. The default
            value is palegreen (#98FB98). See --color for more information.

    --color-base STRING
            Sets the color to be used for nodes that represent packages that
            are in the Base category. It is also used to color the 'Base'
            node in the collapse --mode options. The default value is plum
            (#DDA0DD). See --color for more information.

    --color-base-req STRING
            Sets the color to be used for nodes that represent packages
            which are required by packages in the Base category, but are not
            in the Base category themselves. The default value is pink
            (#FFC0CB).

    --input FILENAME
            Use the specified input file. Defaults to <STDIN>.

    --output FILENAME
            Use the specified output file. Defaults to <STDOUT>.

    --verbose
            Turn on verbose output (to STDERR).

--
Chuck

Attachment: netpbm-dependency-chart-svg.tar.xz
Description: Binary data

Attachment: setup-ini-graph
Description: Text document

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]