summaryrefslogtreecommitdiff
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-29 11:57:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-29 14:01:02 +0100
commitc411a10e06f479ff364c07766f7c77907b7b4a16 (patch)
tree83efcb5a4c96b8e1f4213c24cb8f4d114d957aad /meta/classes/sstate.bbclass
parent68d19cc52869d7732fac0d185be811bc38334970 (diff)
downloadopenembedded-core-c411a10e06f479ff364c07766f7c77907b7b4a16.tar.gz
openembedded-core-c411a10e06f479ff364c07766f7c77907b7b4a16.tar.bz2
openembedded-core-c411a10e06f479ff364c07766f7c77907b7b4a16.zip
sstate: Add support for taking shared lockfiles
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 00a709ba44..cc0b8665f6 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -58,6 +58,7 @@ def sstate_init(name, task, d):
ss['dirs'] = []
ss['plaindirs'] = []
ss['lockfiles'] = []
+ ss['lockfiles-shared'] = []
return ss
def sstate_state_fromvars(d, task = None):
@@ -72,6 +73,7 @@ def sstate_state_fromvars(d, task = None):
outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split()
plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split()
lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split()
+ lockfilesshared = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile-shared', d) or "", d)).split()
interceptfuncs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-interceptfuncs', d) or "", d)).split()
if not name or len(inputs) != len(outputs):
bb.fatal("sstate variables not setup correctly?!")
@@ -80,6 +82,7 @@ def sstate_state_fromvars(d, task = None):
for i in range(len(inputs)):
sstate_add(ss, inputs[i], outputs[i], d)
ss['lockfiles'] = lockfiles
+ ss['lockfiles-shared'] = lockfilesshared
ss['plaindirs'] = plaindirs
ss['interceptfuncs'] = interceptfuncs
return ss
@@ -101,6 +104,8 @@ def sstate_install(ss, d):
bb.fatal("Package already staged (%s)?!" % manifest)
locks = []
+ for lock in ss['lockfiles-shared']:
+ locks.append(bb.utils.lockfile(lock, True))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))
@@ -231,6 +236,8 @@ def sstate_clean(ss, d):
if os.path.exists(manifest):
locks = []
+ for lock in ss['lockfiles-shared']:
+ locks.append(bb.utils.lockfile(lock, True))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))