Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/3] graph-depends: fix handling of "virtual" in exclude_list
Date: Thu, 28 Jan 2016 23:40:19 +0100	[thread overview]
Message-ID: <20160128224019.GF7523@free.fr> (raw)
In-Reply-To: <1453926735-29571-2-git-send-email-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2016-01-27 21:32 +0100, Thomas Petazzoni spake thusly:
> The condition to determine if a virtual package should be excluded
> from the list due to "virtual" being passed in --exclude is under a
> loop iterating over each entry of the exclude_list, but it doesn't use
> the iterator of this list.
> 
> Indeed, the condition contains:
> 
> 	"virtual" in exclude_list
> 
> which checks automatically if "virtual" was passed in the list. Due to
> this, there is no need for this check to be within the "for p in
> exclude_list" iteration. This commit fixes that by moving the check
> outside of the loop.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  support/scripts/graph-depends | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends
> index fd8ad2f..cfb4f82 100755
> --- a/support/scripts/graph-depends
> +++ b/support/scripts/graph-depends
> @@ -359,15 +359,14 @@ def print_pkg_deps(depth, pkg):
>          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
>              add = True
>              for p in exclude_list:
>                  if fnmatch(d,p):
>                      add = False
>                      break
> -                if dict_version.get(d) == "virtual" \
> -                and "virtual" in exclude_list:
> -                    add = False
> -                    break
>              if add:
>                  print("%s -> %s" % (pkg_node_name(pkg), pkg_node_name(d)))
>                  print_pkg_deps(depth+1, d)
> -- 
> 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.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2016-01-28 22:40 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 [this message]
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
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=20160128224019.GF7523@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