support/graph-depends: allow excluding virtual packages
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 31 Mar 2015 22:34:14 +0000 (00:34 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Apr 2015 18:02:54 +0000 (20:02 +0200)
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>
support/scripts/graph-depends

index c1fc0429e4f0c0695e8d6db4482f36c318c1260e..08ecc5a3838582a0cd9c5f80db244e8947d9cfbb 100755 (executable)
@@ -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)