Message ID | 1420188573-4236-2-git-send-email-francois.perrad@gadz.org |
---|---|
State | Superseded |
Headers | show |
Dear Francois Perrad, On Fri, 2 Jan 2015 09:49:33 +0100, Francois Perrad wrote: > Signed-off-by: Francois Perrad <francois.perrad@gadz.org> > --- > docs/manual/common-usage.txt | 3 +++ > support/scripts/graph-depends | 11 +++++++++++ > 2 files changed, 14 insertions(+) Why would we want to stop on virtual packages? I don't really see the use case for this additional option. Thanks, Thomas
2015-01-02 11:21 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Dear Francois Perrad, > > On Fri, 2 Jan 2015 09:49:33 +0100, Francois Perrad wrote: >> Signed-off-by: Francois Perrad <francois.perrad@gadz.org> >> --- >> docs/manual/common-usage.txt | 3 +++ >> support/scripts/graph-depends | 11 +++++++++++ >> 2 files changed, 14 insertions(+) > > Why would we want to stop on virtual packages? I don't really see the > use case for this additional option. > On package point of view (not for a whole configuration), for example, with a package which depends on OpenGL, it is not useful to see the dependencies of a specific implementation of OpenGL, because they depend on hardware and not on the package. The graph of dependencies becomes quickly too large, I think to another option which doesn't display host dependencies but just target dependencies. François > Thanks, > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt index 89cd9fe..966c694 100644 --- a/docs/manual/common-usage.txt +++ b/docs/manual/common-usage.txt @@ -215,6 +215,9 @@ The +graph-depends+ behaviour can be controlled by setting options in the root package (+R+), the target packages (+T+) and the host packages (+H+). Defaults to: +lightblue,grey,gainsboro+ +* +--stop-on-virtual+, +--dont-stop-on-virtual+, to follow (or not) + the dependencies of virtual package + -------------------------------- BR2_GRAPH_DEPS_OPTS='-d 3 --no-transitive --colours=red,green,blue' make graph-depends -------------------------------- diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends index fd94a3c..3a72e26 100755 --- a/support/scripts/graph-depends +++ b/support/scripts/graph-depends @@ -36,6 +36,9 @@ max_depth = 0 # Whether to draw the transitive dependencies transitive = True +# Stop dependency on virtual package +stop_on_virtual = False + parser = argparse.ArgumentParser(description="Graph pacakges dependencies") parser.add_argument("--package", '-p', metavar="PACKAGE", help="Graph the dependencies of PACKAGE") @@ -51,6 +54,10 @@ parser.add_argument("--transitive", dest="transitive", action='store_true', default=False) parser.add_argument("--no-transitive", dest="transitive", action='store_false', help="Draw (do not draw) transitive dependencies") +parser.add_argument("--stop-on-virtual", dest="stop_on_virtual", action='store_true', + default=False) +parser.add_argument("--dont-stop-on-virtual", dest="stop_on_virtual", action='store_false', + help="Stop (or do not stop) on virtual package") args = parser.parse_args() if args.package is None: @@ -63,6 +70,8 @@ max_depth = args.depth transitive = args.transitive +stop_on_virtual = args.stop_on_virtual + # Get the colours: we need exactly three colours, # so no need not split more than 4 # We'll let 'dot' validate the colours... @@ -317,6 +326,8 @@ def print_pkg_deps(depth, pkg): print_attrs(pkg) if pkg not in dict_deps: return + if stop_on_virtual and dict_version[pkg] == "virtual": + return if max_depth == 0 or depth < max_depth: for d in dict_deps[pkg]: print("%s -> %s" % (pkg_node_name(pkg), pkg_node_name(d)))
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> --- docs/manual/common-usage.txt | 3 +++ support/scripts/graph-depends | 11 +++++++++++ 2 files changed, 14 insertions(+)