[Buildroot] [PATCH 1/3] graph-depends: avoid use of global var 'rule' in get_depends

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Feb 5 14:20:42 UTC 2017


Hello,

On Fri,  3 Feb 2017 21:57:42 +0100, Thomas De Schampheleire wrote:
> From: Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
> 
> 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 at nokia.com>
> ---
>  support/scripts/graph-depends | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks. We really need to clean up this script to
move the "global" code into a main() function. Right now there is some
global code intermixed with sub-functions, it's horrible.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list