diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 324ee4fa53..e86d59bd62 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/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) diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 660fd5bf5a..faa94e6c36 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py @@ -74,11 +74,6 @@ logger.setLevel(logging.DEBUG - 2) # can result in construction of the various loggers. import bb.msg -if "BBDEBUG" in os.environ: - level = int(os.environ["BBDEBUG"]) - if level: - bb.msg.set_debug_level(level) - from bb import fetch2 as fetch sys.modules['bb.fetch'] = sys.modules['bb.fetch2']