diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/build.py | 28 | ||||
-rw-r--r-- | bitbake/lib/bb/cache.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 |
4 files changed, 21 insertions, 19 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 4f14e63ac..1b1775f9d 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 6e124b2e8..1d592a42f 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 613654db8..96fdb6627 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 a388773bb..52fd8285e 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) |