diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-09-08 14:41:50 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:48:45 +0100 |
commit | 3a9e230b7a6763a64ff4a26522e444661fa74ddf (patch) | |
tree | dd9b3dc73b0cc4a8deac01cd492851f1319c9553 /meta | |
parent | 2a05181d98b2966e7b6cc5fa79de44d6b863693b (diff) | |
download | poky-3a9e230b7a6763a64ff4a26522e444661fa74ddf.tar.gz |
classes/sstate: break out function to get sstate manifest filename
It is useful in a few different contexts to see which files have been
written out by an sstate task; break out a function that lets us get the
path to the manifest file easily.
(From OE-Core rev: 090196dd2d8f4306b34b239e78c39d37cc86034c)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 7 | ||||
-rw-r--r-- | meta/lib/oe/sstatesig.py | 12 |
2 files changed, 14 insertions, 5 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 50729bf750..b9ad6da9dd 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -157,17 +157,14 @@ def sstate_add(ss, source, dest, d): | |||
157 | 157 | ||
158 | def sstate_install(ss, d): | 158 | def sstate_install(ss, d): |
159 | import oe.path | 159 | import oe.path |
160 | import oe.sstatesig | ||
160 | import subprocess | 161 | import subprocess |
161 | 162 | ||
162 | sharedfiles = [] | 163 | sharedfiles = [] |
163 | shareddirs = [] | 164 | shareddirs = [] |
164 | bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}")) | 165 | bb.utils.mkdirhier(d.expand("${SSTATE_MANIFESTS}")) |
165 | 166 | ||
166 | d2 = d.createCopy() | 167 | manifest, d2 = oe.sstatesig.sstate_get_manifest_filename(ss['task'], d) |
167 | extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True) | ||
168 | if extrainf: | ||
169 | d2.setVar("SSTATE_MANMACH", extrainf) | ||
170 | manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['task']) | ||
171 | 168 | ||
172 | if os.access(manifest, os.R_OK): | 169 | if os.access(manifest, os.R_OK): |
173 | bb.fatal("Package already staged (%s)?!" % manifest) | 170 | bb.fatal("Package already staged (%s)?!" % manifest) |
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 9d6d7c42fc..cb46712eea 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -277,3 +277,15 @@ def find_siginfo(pn, taskname, taskhashlist, d): | |||
277 | return filedates | 277 | return filedates |
278 | 278 | ||
279 | bb.siggen.find_siginfo = find_siginfo | 279 | bb.siggen.find_siginfo = find_siginfo |
280 | |||
281 | |||
282 | def sstate_get_manifest_filename(task, d): | ||
283 | """ | ||
284 | Return the sstate manifest file path for a particular task. | ||
285 | Also returns the datastore that can be used to query related variables. | ||
286 | """ | ||
287 | d2 = d.createCopy() | ||
288 | extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info', True) | ||
289 | if extrainf: | ||
290 | d2.setVar("SSTATE_MANMACH", extrainf) | ||
291 | return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2) | ||