summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-20 11:53:31 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:34 +0100
commitc3eae29efa2318ee4f12b1e1c8d562e18d1cee87 (patch)
tree66adc15f52ffd35621389d9de05df3adf76a1f90 /bitbake/lib/bb
parent214d1f7433fd8571c3e0920624ce07f31c7f08c9 (diff)
downloadopenembedded-core-c3eae29efa2318ee4f12b1e1c8d562e18d1cee87.tar.gz
openembedded-core-c3eae29efa2318ee4f12b1e1c8d562e18d1cee87.tar.bz2
openembedded-core-c3eae29efa2318ee4f12b1e1c8d562e18d1cee87.zip
Don't try to expand non-string values
(Bitbake rev: fe36a726b9f930bbd6fd758c0aee78559e95f02b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/build.py28
-rw-r--r--bitbake/lib/bb/cache.py8
-rw-r--r--bitbake/lib/bb/cooker.py2
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py2
4 files changed, 21 insertions, 19 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 4f14e63ac7..1b1775f9db 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -99,18 +99,19 @@ def exec_func(func, d, dirs = None):
ispython = flags['python']
- cleandirs = (data.expand(flags['cleandirs'], d) or "").split()
- for cdir in cleandirs:
- os.system("rm -rf %s" % cdir)
+ cleandirs = flags['cleandirs']
+ if cleandirs:
+ for cdir in data.expand(cleandirs, d).split():
+ os.system("rm -rf %s" % cdir)
- if dirs:
- dirs = data.expand(dirs, d)
- else:
- dirs = (data.expand(flags['dirs'], d) or "").split()
- for adir in dirs:
- bb.utils.mkdirhier(adir)
+ if dirs is None:
+ dirs = flags['dirs']
+ if dirs:
+ dirs = data.expand(dirs, d).split()
- if len(dirs) > 0:
+ if dirs:
+ for adir in dirs:
+ bb.utils.mkdirhier(adir)
adir = dirs[-1]
else:
adir = data.getVar('B', d, 1)
@@ -157,9 +158,10 @@ def exec_func(func, d, dirs = None):
os.dup2(se.fileno(), ose[1])
locks = []
- lockfiles = (data.expand(flags['lockfiles'], d) or "").split()
- for lock in lockfiles:
- locks.append(bb.utils.lockfile(lock))
+ lockfiles = flags['lockfiles']
+ if lockfiles:
+ for lock in data.expand(lockfiles, d).split():
+ locks.append(bb.utils.lockfile(lock))
try:
# Run the function
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 6e124b2e83..1d592a42f1 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -72,7 +72,7 @@ class Cache:
# If any of configuration.data's dependencies are newer than the
# cache there isn't even any point in loading it...
newest_mtime = 0
- deps = bb.data.getVar("__depends", data, True)
+ deps = bb.data.getVar("__depends", data)
for f, old_mtime in deps:
if old_mtime > newest_mtime:
newest_mtime = old_mtime
@@ -136,7 +136,7 @@ class Cache:
# Make sure __depends makes the depends_cache
# If we're a virtual class we need to make sure all our depends are appended
# to the depends of fn.
- depends = self.getVar("__depends", virtualfn, True) or []
+ depends = self.getVar("__depends", virtualfn) or []
self.depends_cache.setdefault(fn, {})
if "__depends" not in self.depends_cache[fn] or not self.depends_cache[fn]["__depends"]:
self.depends_cache[fn]["__depends"] = depends
@@ -218,7 +218,7 @@ class Cache:
for data in bb_data:
virtualfn = self.realfn2virtual(fn, data)
self.setData(virtualfn, fn, bb_data[data])
- if self.getVar("__SKIPPED", virtualfn, True):
+ if self.getVar("__SKIPPED", virtualfn):
skipped += 1
bb.msg.debug(1, bb.msg.domain.Cache, "Skipping %s" % virtualfn)
else:
@@ -361,7 +361,7 @@ class Cache:
packages_dynamic = (self.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split()
rprovides = (self.getVar("RPROVIDES", file_name, True) or "").split()
- cacheData.task_deps[file_name] = self.getVar("_task_deps", file_name, True)
+ cacheData.task_deps[file_name] = self.getVar("_task_deps", file_name)
# build PackageName to FileName lookup table
if pn not in cacheData.pkg_pn:
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 613654db85..96fdb66270 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -567,7 +567,7 @@ class BBCooker:
# Nomally we only register event handlers at the end of parsing .bb files
# We register any handlers we've found so far here...
- for var in data.getVar('__BBHANDLERS', self.configuration.data) or []:
+ for var in bb.data.getVar('__BBHANDLERS', self.configuration.data) or []:
bb.event.register(var, bb.data.getVar(var, self.configuration.data))
bb.fetch.fetcher_init(self.configuration.data)
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index a388773bb7..52fd8285ed 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -68,8 +68,8 @@ def inherit(files, d):
__inherit_cache = data.getVar('__inherit_cache', d) or []
fn = ""
lineno = 0
- files = data.expand(files, d)
for file in files:
+ file = data.expand(file, d)
if file[0] != "/" and file[-8:] != ".bbclass":
file = os.path.join('classes', '%s.bbclass' % file)