1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-03 01:40:07 +00:00

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
+15 -13
View File
@@ -99,18 +99,19 @@ def exec_func(func, d, dirs = None):
ispython = flags['python'] ispython = flags['python']
cleandirs = (data.expand(flags['cleandirs'], d) or "").split() cleandirs = flags['cleandirs']
for cdir in cleandirs: if cleandirs:
os.system("rm -rf %s" % cdir) 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: if dirs:
dirs = data.expand(dirs, d) for adir in dirs:
else: bb.utils.mkdirhier(adir)
dirs = (data.expand(flags['dirs'], d) or "").split()
for adir in dirs:
bb.utils.mkdirhier(adir)
if len(dirs) > 0:
adir = dirs[-1] adir = dirs[-1]
else: else:
adir = data.getVar('B', d, 1) adir = data.getVar('B', d, 1)
@@ -157,9 +158,10 @@ def exec_func(func, d, dirs = None):
os.dup2(se.fileno(), ose[1]) os.dup2(se.fileno(), ose[1])
locks = [] locks = []
lockfiles = (data.expand(flags['lockfiles'], d) or "").split() lockfiles = flags['lockfiles']
for lock in lockfiles: if lockfiles:
locks.append(bb.utils.lockfile(lock)) for lock in data.expand(lockfiles, d).split():
locks.append(bb.utils.lockfile(lock))
try: try:
# Run the function # Run the function
+4 -4
View File
@@ -72,7 +72,7 @@ class Cache:
# If any of configuration.data's dependencies are newer than the # If any of configuration.data's dependencies are newer than the
# cache there isn't even any point in loading it... # cache there isn't even any point in loading it...
newest_mtime = 0 newest_mtime = 0
deps = bb.data.getVar("__depends", data, True) deps = bb.data.getVar("__depends", data)
for f, old_mtime in deps: for f, old_mtime in deps:
if old_mtime > newest_mtime: if old_mtime > newest_mtime:
newest_mtime = old_mtime newest_mtime = old_mtime
@@ -136,7 +136,7 @@ class Cache:
# Make sure __depends makes the depends_cache # Make sure __depends makes the depends_cache
# If we're a virtual class we need to make sure all our depends are appended # If we're a virtual class we need to make sure all our depends are appended
# to the depends of fn. # to the depends of fn.
depends = self.getVar("__depends", virtualfn, True) or [] depends = self.getVar("__depends", virtualfn) or []
self.depends_cache.setdefault(fn, {}) self.depends_cache.setdefault(fn, {})
if "__depends" not in self.depends_cache[fn] or not self.depends_cache[fn]["__depends"]: if "__depends" not in self.depends_cache[fn] or not self.depends_cache[fn]["__depends"]:
self.depends_cache[fn]["__depends"] = depends self.depends_cache[fn]["__depends"] = depends
@@ -218,7 +218,7 @@ class Cache:
for data in bb_data: for data in bb_data:
virtualfn = self.realfn2virtual(fn, data) virtualfn = self.realfn2virtual(fn, data)
self.setData(virtualfn, fn, bb_data[data]) self.setData(virtualfn, fn, bb_data[data])
if self.getVar("__SKIPPED", virtualfn, True): if self.getVar("__SKIPPED", virtualfn):
skipped += 1 skipped += 1
bb.msg.debug(1, bb.msg.domain.Cache, "Skipping %s" % virtualfn) bb.msg.debug(1, bb.msg.domain.Cache, "Skipping %s" % virtualfn)
else: else:
@@ -361,7 +361,7 @@ class Cache:
packages_dynamic = (self.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split() packages_dynamic = (self.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split()
rprovides = (self.getVar("RPROVIDES", 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 # build PackageName to FileName lookup table
if pn not in cacheData.pkg_pn: if pn not in cacheData.pkg_pn:
+1 -1
View File
@@ -567,7 +567,7 @@ class BBCooker:
# Nomally we only register event handlers at the end of parsing .bb files # Nomally we only register event handlers at the end of parsing .bb files
# We register any handlers we've found so far here... # 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.event.register(var, bb.data.getVar(var, self.configuration.data))
bb.fetch.fetcher_init(self.configuration.data) bb.fetch.fetcher_init(self.configuration.data)
+1 -1
View File
@@ -68,8 +68,8 @@ def inherit(files, d):
__inherit_cache = data.getVar('__inherit_cache', d) or [] __inherit_cache = data.getVar('__inherit_cache', d) or []
fn = "" fn = ""
lineno = 0 lineno = 0
files = data.expand(files, d)
for file in files: for file in files:
file = data.expand(file, d)
if file[0] != "/" and file[-8:] != ".bbclass": if file[0] != "/" and file[-8:] != ".bbclass":
file = os.path.join('classes', '%s.bbclass' % file) file = os.path.join('classes', '%s.bbclass' % file)