aboutsummaryrefslogtreecommitdiff
path: root/support/scripts
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-01-27 21:32:13 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-02-08 21:28:19 +0100
commit7771bb93b2a2b2b9ef6835785d51fb2bfe1ea584 (patch)
tree27c67f82e341a08b6a6a32bf96dda0bf955195a2 /support/scripts
parent7e1eec49a520081835e305f071c96eca0d4fd33e (diff)
downloadbuildroot-7771bb93b2a2b2b9ef6835785d51fb2bfe1ea584.tar.gz
buildroot-7771bb93b2a2b2b9ef6835785d51fb2bfe1ea584.tar.bz2
graph-depends: fix handling of "virtual" in exclude_list
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/scripts')
-rwxr-xr-xsupport/scripts/graph-depends7
1 files changed, 3 insertions, 4 deletions
diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends
index efb73d28f6..fcf3ccab17 100755
--- a/support/scripts/graph-depends
+++ b/support/scripts/graph-depends
@@ -403,15 +403,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:
outfile.write("%s -> %s\n" % (pkg_node_name(pkg), pkg_node_name(d)))
print_pkg_deps(depth+1, d)