]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: Add support for task specific lockfiles
authorRichard Purdie <richard@openedhand.com>
Sun, 25 Nov 2007 14:25:59 +0000 (14:25 +0000)
committerRichard Purdie <richard@openedhand.com>
Sun, 25 Nov 2007 14:25:59 +0000 (14:25 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3232 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake/lib/bb/build.py

index f41898ec14ef54e4146f4e689c963ad7f42bf861..1c015fe9a3f38679c5f4c3ede9d0e3beb7359c66 100644 (file)
@@ -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)