diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-10 12:54:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-10 12:56:50 +0000 |
commit | 09f65c6e61f8ab0ce33d58539476cde7ccdc92ca (patch) | |
tree | 67d953cdcfbb0b6630fd9b96afa2e6714ca66029 /meta | |
parent | adaa81c97a873650abd22f96e02e55699c7590c0 (diff) | |
download | poky-09f65c6e61f8ab0ce33d58539476cde7ccdc92ca.tar.gz |
sstate: Stop overwriting SSTATE_PKG
Its rather antisocial to overwrite SSTATE_PKG with an expanded form for the variable
and it stops the value of BB_UNIHASH being changed when the package is written out.
Instead of expanding the variable, append to it instead to avoid this rather
hard to figure out behaviour and allow the siggen code to behave as expected.
(From OE-Core rev: 62eca02024b4c44d618ab9bcf87a3166c886dadb)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 64808f8e10..eb1ecd6822 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -318,7 +318,8 @@ def sstate_installpkg(ss, d): | |||
318 | 318 | ||
319 | sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['task']) | 319 | sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['task']) |
320 | sstatefetch = d.getVar('SSTATE_PKGNAME') + '_' + ss['task'] + ".tgz" | 320 | sstatefetch = d.getVar('SSTATE_PKGNAME') + '_' + ss['task'] + ".tgz" |
321 | sstatepkg = d.getVar('SSTATE_PKG') + '_' + ss['task'] + ".tgz" | 321 | d.appendVar('SSTATE_PKG', '_'+ ss['task'] + ".tgz") |
322 | sstatepkg = d.getVar('SSTATE_PKG') | ||
322 | 323 | ||
323 | if not os.path.exists(sstatepkg): | 324 | if not os.path.exists(sstatepkg): |
324 | pstaging_fetch(sstatefetch, d) | 325 | pstaging_fetch(sstatefetch, d) |
@@ -330,7 +331,6 @@ def sstate_installpkg(ss, d): | |||
330 | sstate_clean(ss, d) | 331 | sstate_clean(ss, d) |
331 | 332 | ||
332 | d.setVar('SSTATE_INSTDIR', sstateinst) | 333 | d.setVar('SSTATE_INSTDIR', sstateinst) |
333 | d.setVar('SSTATE_PKG', sstatepkg) | ||
334 | 334 | ||
335 | if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False): | 335 | if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False): |
336 | signer = get_signer(d, 'local') | 336 | signer = get_signer(d, 'local') |
@@ -612,7 +612,8 @@ def sstate_package(ss, d): | |||
612 | tmpdir = d.getVar('TMPDIR') | 612 | tmpdir = d.getVar('TMPDIR') |
613 | 613 | ||
614 | sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['task']) | 614 | sstatebuild = d.expand("${WORKDIR}/sstate-build-%s/" % ss['task']) |
615 | sstatepkg = d.getVar('SSTATE_PKG') + '_'+ ss['task'] + ".tgz" | 615 | d.appendVar('SSTATE_PKG', '_'+ ss['task'] + ".tgz") |
616 | sstatepkg = d.getVar('SSTATE_PKG') | ||
616 | bb.utils.remove(sstatebuild, recurse=True) | 617 | bb.utils.remove(sstatebuild, recurse=True) |
617 | bb.utils.mkdirhier(sstatebuild) | 618 | bb.utils.mkdirhier(sstatebuild) |
618 | bb.utils.mkdirhier(os.path.dirname(sstatepkg)) | 619 | bb.utils.mkdirhier(os.path.dirname(sstatepkg)) |
@@ -648,7 +649,6 @@ def sstate_package(ss, d): | |||
648 | os.rename(plain, pdir) | 649 | os.rename(plain, pdir) |
649 | 650 | ||
650 | d.setVar('SSTATE_BUILDDIR', sstatebuild) | 651 | d.setVar('SSTATE_BUILDDIR', sstatebuild) |
651 | d.setVar('SSTATE_PKG', sstatepkg) | ||
652 | d.setVar('SSTATE_INSTDIR', sstatebuild) | 652 | d.setVar('SSTATE_INSTDIR', sstatebuild) |
653 | 653 | ||
654 | if d.getVar('SSTATE_SKIP_CREATION') == '1': | 654 | if d.getVar('SSTATE_SKIP_CREATION') == '1': |