graph-depends: avoid use of global var 'rule' in get_depends
commitbd8b531d24431141a919daf6c50cca7de8547023
authorThomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Fri, 3 Feb 2017 20:57:42 +0000 (3 21:57 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 5 Feb 2017 14:20:02 +0000 (5 15:20 +0100)
treea159789e0a111c6b384a42d80bcab6ea4145d710
parentff28d37dfa1b961f438c007f81b6b8d28f1f2624
graph-depends: avoid use of global var 'rule' in get_depends

Function get_depends was recently changed to support both normal
dependencies as reverse dependencies, via a global variable 'rule' that
equals 'show-depends' or 'show-rdepends'.

As a subsequent function will extract this function get_depends to a
separate file, the use of globals is problematic.

Instead, pass the global as an argument.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/graph-depends