summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py28
1 files changed, 15 insertions, 13 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