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>
This commit is contained in:
Chris Larson 2010-04-20 11:53:31 -07:00 committed by Richard Purdie
parent 214d1f7433
commit c3eae29efa
4 changed files with 21 additions and 19 deletions

View File

@ -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 is None:
dirs = flags['dirs']
if dirs:
dirs = data.expand(dirs, d).split()
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 len(dirs) > 0:
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

View File

@ -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:

View File

@ -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)

View File

@ -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)