diff options
author | Richard Purdie <richard@openedhand.com> | 2007-11-25 14:25:59 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-11-25 14:25:59 +0000 |
commit | c0adbcbc1cbf6cd5a2a1cc41f5c7bcb8988019f6 (patch) | |
tree | 56a87d5ad10661e2db9189188ba7666e43361322 /bitbake/lib/bb/build.py | |
parent | a7ed27d541a5d2c5a8656465a2b1dac2e131b1c5 (diff) | |
download | ast2050-yocto-poky-c0adbcbc1cbf6cd5a2a1cc41f5c7bcb8988019f6.zip ast2050-yocto-poky-c0adbcbc1cbf6cd5a2a1cc41f5c7bcb8988019f6.tar.gz |
bitbake: Add support for task specific lockfiles
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3232 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index f41898e..1c015fe 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -97,11 +97,19 @@ def exec_func(func, d, dirs = None): if adir and os.access(adir, os.F_OK): os.chdir(adir) + locks = [] + lockfiles = (data.expand(data.getVarFlag(func, 'lockfiles', d), d) or "").split() + for lock in lockfiles: + locks.append(bb.utils.lockfile(lock)) + if data.getVarFlag(func, "python", d): exec_func_python(func, d) else: exec_func_shell(func, d) + for lock in locks: + bb.utils.unlockfile(lock) + if os.path.exists(prevdir): os.chdir(prevdir) |