]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: support $BITBAKE_UI environment
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Sun, 20 May 2012 15:19:11 +0000 (17:19 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 May 2012 10:35:11 +0000 (11:35 +0100)
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 <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake
bitbake/doc/bitbake.1

index 420e69d0c9b1e34bcc198d84012771ce9b26cb7a..478ac061241778f7aea39e7dfc15cbb19cee5263 100755 (executable)
@@ -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
index aa096203e47fd12af4ea4840d6c659fe0740e001..d9d39020f5142e734b08a0063d15f00f86af6258 100644 (file)
@@ -103,7 +103,13 @@ Show debug logging for the specified logging domains
 .TP
 .B \-P, \-\-profile
 profile the command and print a report
+
+.SH ENVIRONMENT VARIABLES
+bitbake uses the following environment variables to control its
+operation:
 .TP
+.B BITBAKE_UI
+The bitbake user interface; overridden by the \fB-u\fP commandline option.
 
 .SH AUTHORS
 BitBake was written by