summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastermain/settings.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-17 10:45:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:24:31 +0000
commitbbac0f092a20ab76be510d403fb946ea90f6597e (patch)
tree7cf6ba784f20cebac8e9448d02ce09ca3a506f13 /bitbake/lib/toaster/toastermain/settings.py
parent851f0d82d9744e2eebb1f382a9963f3815b9822c (diff)
downloadpoky-bbac0f092a20ab76be510d403fb946ea90f6597e.tar.gz
bitbake: toaster: Add BUILD_MODE flag to context
We set a TOASTER_MANAGED env variable in the startup script, which has a value of "1" if Toaster should run in build mode. Add a BUILD_MODE variable to settings.py which is True if TOASTER_MANAGED is set to "1", False otherwise. Add this to the context for every template, so we can use this information to conditionally alter the content of pages according to the mode we're in. [YOCTO #8514] (Bitbake rev: f9cf4739fc85c9760ce748323dc7c8de3fa7eaec) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastermain/settings.py')
-rw-r--r--bitbake/lib/toaster/toastermain/settings.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 6439d68c3f..b28ddb2b0d 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -92,11 +92,9 @@ if 'DATABASE_URL' in os.environ:
92 else: 92 else:
93 raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl) 93 raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl)
94 94
95 95BUILD_MODE = False
96if 'TOASTER_MANAGED' in os.environ and os.environ['TOASTER_MANAGED'] == "1": 96if 'TOASTER_MANAGED' in os.environ and os.environ['TOASTER_MANAGED'] == "1":
97 MANAGED = True 97 BUILD_MODE = True
98else:
99 MANAGED = False
100 98
101# Allows current database settings to be exported as a DATABASE_URL environment variable value 99# Allows current database settings to be exported as a DATABASE_URL environment variable value
102 100