diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 7 |
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): | |||
58 | ss['dirs'] = [] | 58 | ss['dirs'] = [] |
59 | ss['plaindirs'] = [] | 59 | ss['plaindirs'] = [] |
60 | ss['lockfiles'] = [] | 60 | ss['lockfiles'] = [] |
61 | ss['lockfiles-shared'] = [] | ||
61 | return ss | 62 | return ss |
62 | 63 | ||
63 | def sstate_state_fromvars(d, task = None): | 64 | def sstate_state_fromvars(d, task = None): |
@@ -72,6 +73,7 @@ def sstate_state_fromvars(d, task = None): | |||
72 | outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split() | 73 | outputs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-outputdirs', d) or "", d)).split() |
73 | plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split() | 74 | plaindirs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-plaindirs', d) or "", d)).split() |
74 | lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split() | 75 | lockfiles = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile', d) or "", d)).split() |
76 | lockfilesshared = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-lockfile-shared', d) or "", d)).split() | ||
75 | interceptfuncs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-interceptfuncs', d) or "", d)).split() | 77 | interceptfuncs = (bb.data.expand(bb.data.getVarFlag("do_" + task, 'sstate-interceptfuncs', d) or "", d)).split() |
76 | if not name or len(inputs) != len(outputs): | 78 | if not name or len(inputs) != len(outputs): |
77 | bb.fatal("sstate variables not setup correctly?!") | 79 | bb.fatal("sstate variables not setup correctly?!") |
@@ -80,6 +82,7 @@ def sstate_state_fromvars(d, task = None): | |||
80 | for i in range(len(inputs)): | 82 | for i in range(len(inputs)): |
81 | sstate_add(ss, inputs[i], outputs[i], d) | 83 | sstate_add(ss, inputs[i], outputs[i], d) |
82 | ss['lockfiles'] = lockfiles | 84 | ss['lockfiles'] = lockfiles |
85 | ss['lockfiles-shared'] = lockfilesshared | ||
83 | ss['plaindirs'] = plaindirs | 86 | ss['plaindirs'] = plaindirs |
84 | ss['interceptfuncs'] = interceptfuncs | 87 | ss['interceptfuncs'] = interceptfuncs |
85 | return ss | 88 | return ss |
@@ -101,6 +104,8 @@ def sstate_install(ss, d): | |||
101 | bb.fatal("Package already staged (%s)?!" % manifest) | 104 | bb.fatal("Package already staged (%s)?!" % manifest) |
102 | 105 | ||
103 | locks = [] | 106 | locks = [] |
107 | for lock in ss['lockfiles-shared']: | ||
108 | locks.append(bb.utils.lockfile(lock, True)) | ||
104 | for lock in ss['lockfiles']: | 109 | for lock in ss['lockfiles']: |
105 | locks.append(bb.utils.lockfile(lock)) | 110 | locks.append(bb.utils.lockfile(lock)) |
106 | 111 | ||
@@ -231,6 +236,8 @@ def sstate_clean(ss, d): | |||
231 | 236 | ||
232 | if os.path.exists(manifest): | 237 | if os.path.exists(manifest): |
233 | locks = [] | 238 | locks = [] |
239 | for lock in ss['lockfiles-shared']: | ||
240 | locks.append(bb.utils.lockfile(lock, True)) | ||
234 | for lock in ss['lockfiles']: | 241 | for lock in ss['lockfiles']: |
235 | locks.append(bb.utils.lockfile(lock)) | 242 | locks.append(bb.utils.lockfile(lock)) |
236 | 243 | ||