aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r--lib/bb/cooker.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index d2b5ceb3b..cf65ab2c9 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -386,7 +386,7 @@ class BBCooker:
replaced = False
#do not save if nothing changed
- if str(val) == self.data.getVar(var):
+ if str(val) == self.data.getVar(var, False):
return
conf_files = self.data.varhistory.get_variable_files(var)
@@ -398,7 +398,7 @@ class BBCooker:
listval += "%s " % value
val = listval
- topdir = self.data.getVar("TOPDIR")
+ topdir = self.data.getVar("TOPDIR", False)
#comment or replace operations made on var
for conf_file in conf_files:
@@ -453,7 +453,7 @@ class BBCooker:
def removeConfigurationVar(self, var):
conf_files = self.data.varhistory.get_variable_files(var)
- topdir = self.data.getVar("TOPDIR")
+ topdir = self.data.getVar("TOPDIR", False)
for conf_file in conf_files:
if topdir in conf_file:
@@ -493,7 +493,7 @@ class BBCooker:
def parseConfiguration(self):
# Set log file verbosity
- verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", "0"))
+ verboselogs = bb.utils.to_boolean(self.data.getVar("BB_VERBOSE_LOGS", False))
if verboselogs:
bb.msg.loggerVerboseLogs = True
@@ -613,7 +613,7 @@ class BBCooker:
data.expandKeys(envdata)
for e in envdata.keys():
if data.getVarFlag( e, 'python', envdata ):
- logger.plain("\npython %s () {\n%s}\n", e, data.getVar(e, envdata, 1))
+ logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, True))
def buildTaskData(self, pkgs_to_build, task, abort):
@@ -908,8 +908,8 @@ class BBCooker:
for appends in appends_without_recipes
for append in appends)
msg = 'No recipes available for:\n%s' % '\n'.join(appendlines)
- warn_only = data.getVar("BB_DANGLINGAPPENDS_WARNONLY", \
- self.data, False) or "no"
+ warn_only = self.data.getVar("BB_DANGLINGAPPENDS_WARNONLY", \
+ False) or "no"
if warn_only.lower() in ("1", "yes", "true"):
bb.warn(msg)
else:
@@ -956,8 +956,8 @@ class BBCooker:
# Generate a list of parsed configuration files by searching the files
# listed in the __depends and __base_depends variables with a .conf suffix.
conffiles = []
- dep_files = self.data.getVar('__base_depends') or []
- dep_files = dep_files + (self.data.getVar('__depends') or [])
+ dep_files = self.data.getVar('__base_depends', False) or []
+ dep_files = dep_files + (self.data.getVar('__depends', False) or [])
for f in dep_files:
if f[0].endswith(".conf"):
@@ -1174,7 +1174,7 @@ class BBCooker:
"""
Setup any variables needed before starting a build
"""
- if not self.data.getVar("BUILDNAME"):
+ if not self.data.getVar("BUILDNAME", False):
self.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'))
self.data.setVar("BUILDSTART", time.strftime('%m/%d/%Y %H:%M:%S', time.gmtime()))
@@ -1275,7 +1275,7 @@ class BBCooker:
taskdata = bb.taskdata.TaskData(self.configuration.abort)
taskdata.add_provider(self.data, self.recipecache, item)
- buildname = self.data.getVar("BUILDNAME")
+ buildname = self.data.getVar("BUILDNAME", False)
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.expanded_data)
# Execute the runqueue
@@ -1348,7 +1348,7 @@ class BBCooker:
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
- buildname = self.data.getVar("BUILDNAME")
+ buildname = self.data.getVar("BUILDNAME", False)
bb.event.fire(bb.event.BuildStarted(buildname, fulltargetlist), self.data)
rq = bb.runqueue.RunQueue(self, self.data, self.recipecache, taskdata, runlist)
@@ -1402,7 +1402,7 @@ class BBCooker:
if base_image is None:
imagefile.write("inherit core-image\n")
else:
- topdir = self.data.getVar("TOPDIR")
+ topdir = self.data.getVar("TOPDIR", False)
if topdir in base_image:
base_image = require_line.split()[1]
imagefile.write("require " + base_image + "\n")
@@ -1462,7 +1462,7 @@ class BBCooker:
(filelist, masked) = self.collection.collect_bbfiles(self.data, self.expanded_data)
self.data.renameVar("__depends", "__base_depends")
- self.add_filewatch(self.data.getVar("__base_depends"), self.configwatcher)
+ self.add_filewatch(self.data.getVar("__base_depends", False), self.configwatcher)
self.parser = CookerParser(self, filelist, masked)
self.parsecache_valid = True