From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/3] graph-depends: add support for excluding host packages
Date: Thu, 28 Jan 2016 23:44:33 +0100 [thread overview]
Message-ID: <20160128224433.GG7523@free.fr> (raw)
In-Reply-To: <1453926735-29571-3-git-send-email-thomas.petazzoni@free-electrons.com>
Thomas, All,
On 2016-01-27 21:32 +0100, Thomas Petazzoni spake thusly:
> Just like the --stop-on and --exclude options allow to stop on or
> exclude virtual packages from the list by passing the "virtual" magic
> value, this commit extends the graph-depends logic to support a "host"
> magic value for --stop-on and --exclude. This will allow to draw the
> graph by stopping on host packages, or by excluding host packages.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
However, see below for a minor comment...
> ---
> support/scripts/graph-depends | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends
> index cfb4f82..e4a230f 100755
> --- a/support/scripts/graph-depends
> +++ b/support/scripts/graph-depends
> @@ -44,8 +44,9 @@ parser.add_argument("--depth", '-d', metavar="DEPTH", dest="depth", type=int, de
> help="Limit the dependency graph to DEPTH levels; 0 means no limit.")
> parser.add_argument("--stop-on", "-s", metavar="PACKAGE", dest="stop_list", action="append",
> help="Do not graph past this package (can be given multiple times)." \
> - + " Can be a package name or a glob, or" \
> - + " 'virtual' to stop on virtual packages.")
> + + " Can be a package name or a glob, " \
> + + " 'virtual' to stop on virtual packages, or " \
> + + "'host' to stop on host packages.")
> parser.add_argument("--exclude", "-x", metavar="PACKAGE", dest="exclude_list", action="append",
> help="Like --stop-on, but do not add PACKAGE to the graph.")
> parser.add_argument("--colours", "-c", metavar="COLOR_LIST", dest="colours",
> @@ -357,11 +358,15 @@ def print_pkg_deps(depth, pkg):
> return
> if dict_version.get(pkg) == "virtual" and "virtual" in stop_list:
> return
> + if pkg.startswith("host-") and "host" in stop_list:
> + return
> if max_depth == 0 or depth < max_depth:
> for d in dict_deps[pkg]:
> if dict_version.get(d) == "virtual" \
> and "virtual" in exclude_list:
> continue
> + if d.startswith("host-") and "host" in exclude_list:
Can we make that line look like the corresponding line for the virtual
packages, two-and-three lines above?
Regards,
Yann E. MORIN.
> + continue
> add = True
> for p in exclude_list:
> if fnmatch(d,p):
> --
> 2.6.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-01-28 22:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 20:32 [Buildroot] [PATCH v2 0/3] graph-depends: allow to exclude host packages Thomas Petazzoni
2016-01-27 20:32 ` [Buildroot] [PATCH v2 1/3] graph-depends: fix handling of "virtual" in exclude_list Thomas Petazzoni
2016-01-28 22:40 ` Yann E. MORIN
2016-01-27 20:32 ` [Buildroot] [PATCH v2 2/3] graph-depends: add support for excluding host packages Thomas Petazzoni
2016-01-28 22:44 ` Yann E. MORIN [this message]
2016-01-29 8:14 ` Thomas Petazzoni
2016-01-27 20:32 ` [Buildroot] [PATCH v2 3/3] docs/manual: update graph-depends documentation about --stop-on Thomas Petazzoni
2016-01-28 22:47 ` Yann E. MORIN
2016-02-08 21:38 ` [Buildroot] [PATCH v2 0/3] graph-depends: allow to exclude host packages Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160128224433.GG7523@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox