support/scripts/graph-depends: introduce MANDATORY_DEPS array
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 2 Dec 2018 09:04:35 +0000 (10:04 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 6 Dec 2018 21:17:07 +0000 (22:17 +0100)
This array will be re-used in another function in a follow-up commit,
so it makes sense to factor it out.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/graph-depends

index f1b6b142fbf59508430b6c454463bf98a1771f62..d2b100f3853cd8f2f0b92b5b5348d5512654314f 100755 (executable)
@@ -170,10 +170,15 @@ def remove_transitive_deps(pkg, deps):
     return new_d
 
 
+# List of dependencies that all/many packages have, and that we want
+# to trim when generating the dependency graph.
+MANDATORY_DEPS = ['toolchain', 'skeleton']
+
+
 # This function removes the dependency on some 'mandatory' package, like the
 # 'toolchain' package, or the 'skeleton' package
 def remove_mandatory_deps(pkg, deps):
-    return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']]
+    return [p for p in deps[pkg] if p not in MANDATORY_DEPS]
 
 
 # This function will check that there is no loop in the dependency chain