From 358016f463958640c694d031a481264a0e770802 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 20 May 2012 17:19:11 +0200 Subject: bitbake: support $BITBAKE_UI environment Patch adds support for a $BITBAKE_UI environment variable which allows to configure the preferred user interface. Although an '-u' option (which will override the environment variable) exists already, it was required to specify this option on every invocation of bitbake. Because user interface is instanciated very early in the program it is not possible to use bitbake.conf for setting up a default. An environment variable (which acts in a similar category like $PAGER or $EDITOR) is a simple way for configuring the default. (Bitbake rev: e3c213015953d1a0afb5ef4be59e1264990e5cee) Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie --- bitbake/bin/bitbake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bitbake/bin') diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 420e69d0c9..478ac06124 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake @@ -56,10 +56,11 @@ class BBConfiguration(object): def get_ui(config): - if config.ui: - interface = config.ui - else: - interface = 'knotty' + if not config.ui: + # modify 'ui' attribute because it is also read by cooker + config.ui = os.environ.get('BITBAKE_UI', 'knotty') + + interface = config.ui try: # Dynamically load the UI based on the ui name. Although we -- cgit v1.2.3-54-g00ecf