diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-04 18:06:32 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-05 00:14:37 +0100 |
commit | d62302f219547336af8109dd5876ab4b30164c07 (patch) | |
tree | 5d53c25b13c38121f15a20a19c92d03ad7581aa4 | |
parent | 633818c21b1879cbb24a4d97edf3a7870fe2caf7 (diff) | |
download | ast2050-yocto-poky-d62302f219547336af8109dd5876ab4b30164c07.zip ast2050-yocto-poky-d62302f219547336af8109dd5876ab4b30164c07.tar.gz |
sstate: Remove name sstate parameter
A while ago we stopped supporting sstate names which were different from the
taskname. This patch finishes cleaning up some code remnants from that
which were causing data duplication and confusion.
(From OE-Core rev: 5a19863e389d28d8db4a86e409c1daa3c6b46eff)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index f371fda..297e29f 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -78,10 +78,9 @@ python () { d.appendVarFlag(task, 'postfuncs', " sstate_task_postfunc") } -def sstate_init(name, task, d): +def sstate_init(task, d): ss = {} ss['task'] = task - ss['name'] = name ss['dirs'] = [] ss['plaindirs'] = [] ss['lockfiles'] = [] @@ -95,24 +94,22 @@ def sstate_state_fromvars(d, task = None): bb.fatal("sstate code running without task context?!") task = task.replace("_setscene", "") - name = task if task.startswith("do_"): - name = task[3:] - task = name + task = task[3:] inputs = (d.getVarFlag("do_" + task, 'sstate-inputdirs', True) or "").split() outputs = (d.getVarFlag("do_" + task, 'sstate-outputdirs', True) or "").split() plaindirs = (d.getVarFlag("do_" + task, 'sstate-plaindirs', True) or "").split() lockfiles = (d.getVarFlag("do_" + task, 'sstate-lockfile', True) or "").split() lockfilesshared = (d.getVarFlag("do_" + task, 'sstate-lockfile-shared', True) or "").split() interceptfuncs = (d.getVarFlag("do_" + task, 'sstate-interceptfuncs', True) or "").split() - if not name or len(inputs) != len(outputs): + if not task or len(inputs) != len(outputs): bb.fatal("sstate variables not setup correctly?!") - if name == "populate_lic": + if task == "populate_lic": d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}") d.setVar("SSTATE_EXTRAPATH", "") - ss = sstate_init(name, task, d) + ss = sstate_init(task, d) for i in range(len(inputs)): sstate_add(ss, inputs[i], outputs[i], d) ss['lockfiles'] = lockfiles @@ -144,7 +141,7 @@ def sstate_install(ss, d): extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True) if extrainf: d2.setVar("SSTATE_MANMACH", extrainf) - manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) + manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['task']) if os.access(manifest, os.R_OK): bb.fatal("Package already staged (%s)?!" % manifest) @@ -230,9 +227,9 @@ def sstate_installpkg(ss, d): bb.utils.mkdirhier(dir) oe.path.remove(dir) - sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name']) - sstatefetch = d.getVar('SSTATE_PKGNAME', True) + '_' + ss['name'] + ".tgz" - sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz" + sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['task']) + sstatefetch = d.getVar('SSTATE_PKGNAME', True) + '_' + ss['task'] + ".tgz" + sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['task'] + ".tgz" if not os.path.exists(sstatepkg): pstaging_fetch(sstatefetch, sstatepkg, d) @@ -302,7 +299,7 @@ def sstate_installpkg(ss, d): def sstate_clean_cachefile(ss, d): import oe.path - sstatepkgfile = d.getVar('SSTATE_PATHSPEC', True) + "*_" + ss['name'] + ".tgz*" + sstatepkgfile = d.getVar('SSTATE_PATHSPEC', True) + "*_" + ss['task'] + ".tgz*" bb.note("Removing %s" % sstatepkgfile) oe.path.remove(sstatepkgfile) @@ -350,7 +347,7 @@ def sstate_clean(ss, d): else: wildcard_stfile = "%s.do_%s*" % (stamp_clean, ss['task']) - manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) + manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['task']) if os.path.exists(manifest): locks = [] @@ -483,8 +480,8 @@ def sstate_package(ss, d): tmpdir = d.getVar('TMPDIR', True) - sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['name']) - sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['name'] + ".tgz" + sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['task']) + sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['task'] + ".tgz" bb.utils.remove(sstatebuild, recurse=True) bb.utils.mkdirhier(sstatebuild) bb.utils.mkdirhier(os.path.dirname(sstatepkg)) |