From 3a1b75037fe1e5282ffd40b037e93353405faa45 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 14 Dec 2012 12:30:27 +0000 Subject: bin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbake The method this older code was accessing doesn't exist. A library shouldn't be changing behaviour based on the environment anyway when sepcific function calls exist to correctly setup the logging. Fix the crash if BBDEBUG was used by moving the code to bin/bitbake. [YOCTO #3319] Signed-off-by: Richard Purdie --- bin/bitbake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/bitbake b/bin/bitbake index 324ee4fa5..e86d59bd6 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -214,6 +214,11 @@ Default BBFILES are the .bb files in the current directory.""") if configuration.bind and configuration.servertype != "xmlrpc": sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n") + if "BBDEBUG" in os.environ: + level = int(os.environ["BBDEBUG"]) + if level > configuration.debug: + configuration.debug = level + bb.msg.init_msgconfig(configuration.verbose, configuration.debug, configuration.debug_domains) -- cgit 1.2.3-korg