support/graph-depends: allow excluding virtual packages

Like for --stop-on, make --exclude recognise the keyword 'virtual',
to stop on virtual packages (as explained in the help...).

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Yann E. MORIN 2015-04-01 00:34:14 +02:00 committed by Thomas Petazzoni
parent f9a016a93b
commit 5bcfaaaf4e

View File

@ -333,6 +333,10 @@ def print_pkg_deps(depth, pkg):
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)