diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-05 22:21:34 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-05 22:26:33 +0100 |
commit | 35d095c282aa27bb2c5b90b9ebafeaa4a3de907e (patch) | |
tree | e4e5b4732ffa2e58f2e93fc51d3bd7e101e5eedf /meta/classes | |
parent | 2d93cb0a0d70e6219379363cd80d375e30abebae (diff) | |
download | poky-35d095c282aa27bb2c5b90b9ebafeaa4a3de907e.tar.gz |
bitbake/sstate: Implement a lookup function to speed up setscene processing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/deploy.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/sstate.bbclass | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/meta/classes/deploy.bbclass b/meta/classes/deploy.bbclass index f697e70aa4..c3371421d8 100644 --- a/meta/classes/deploy.bbclass +++ b/meta/classes/deploy.bbclass | |||
@@ -1,6 +1,6 @@ | |||
1 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" | 1 | DEPLOYDIR = "${WORKDIR}/deploy-${PN}" |
2 | SSTATETASKS += "do_deploy" | 2 | SSTATETASKS += "do_deploy" |
3 | do_deploy[sstate-name] = "deploy-${PN}" | 3 | do_deploy[sstate-name] = "deploy" |
4 | do_deploy[sstate-inputdirs] = "${DEPLOYDIR}" | 4 | do_deploy[sstate-inputdirs] = "${DEPLOYDIR}" |
5 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" | 5 | do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}" |
6 | 6 | ||
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 855f5a45a7..7f897ae54d 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -9,6 +9,8 @@ SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}" | |||
9 | 9 | ||
10 | SSTATE_SCAN_CMD ?= "find ${SSTATE_BUILDDIR} \( -name "*.la" -o -name "*-config" \) -type f" | 10 | SSTATE_SCAN_CMD ?= "find ${SSTATE_BUILDDIR} \( -name "*.la" -o -name "*-config" \) -type f" |
11 | 11 | ||
12 | BB_HASHFILENAME = "${SSTATE_PKGNAME}" | ||
13 | |||
12 | python () { | 14 | python () { |
13 | if bb.data.inherits_class('native', d): | 15 | if bb.data.inherits_class('native', d): |
14 | bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) | 16 | bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d) |
@@ -313,3 +315,27 @@ sstate_unpack_package () { | |||
313 | cd ${SSTATE_INSTDIR} | 315 | cd ${SSTATE_INSTDIR} |
314 | tar -xvzf ${SSTATE_PKG} | 316 | tar -xvzf ${SSTATE_PKG} |
315 | } | 317 | } |
318 | |||
319 | BB_HASHCHECK_FUNCTION = "sstate_checkhashes" | ||
320 | |||
321 | def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | ||
322 | ret = [] | ||
323 | # This needs to go away, FIXME | ||
324 | mapping = { | ||
325 | "do_populate_sysroot" : "populate-sysroot", | ||
326 | "do_package_write_ipk" : "deploy-ipk", | ||
327 | "do_package_write_deb" : "deploy-deb", | ||
328 | "do_package_write_rpm" : "deploy-rpm", | ||
329 | "do_package" : "package", | ||
330 | "do_deploy" : "deploy", | ||
331 | } | ||
332 | |||
333 | for task in range(len(sq_fn)): | ||
334 | sstatefile = bb.data.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz", d) | ||
335 | sstatefile= sstatefile.replace("${BB_TASKHASH}", sq_hash[task]) | ||
336 | #print("Checking for %s" % sstatefile) | ||
337 | if os.path.exists(sstatefile): | ||
338 | ret.append(task) | ||
339 | |||
340 | return ret | ||
341 | |||