diff options
author | Tobias Hagelborn <tobias.hagelborn@axis.com> | 2023-01-30 15:20:25 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-02-11 04:03:33 -1000 |
commit | 51c7e5c9f292278f5bdf35bdbd251c50482d55dc (patch) | |
tree | 6493a05e930c284fc2fa8eda5cfa6a2b53ce311f /meta | |
parent | cbb6344c583a4aaef6514120b4f38f376859368d (diff) | |
download | openembedded-core-51c7e5c9f292278f5bdf35bdbd251c50482d55dc.tar.gz |
sstate.bbclass: Fetch non-existing local .sig files if needed
For the case of a global shared state cache and a local sstate cache
with a mix of signed and un-signed entries, there is a case where
a .sig is missing locally, but may exist in the global sstate cache.
For this case, do not just fail sstate fetch, but rather backfill
the .sig file from the global sstate cache.
If this case is detected, re-run the fetch operation to get the
global .sig file (if it exists).
Signed-off-by: Tobias Hagelborn <tobias.hagelborn@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit d5ea1a5396bf9fd4303cae46bc0e042be8de8d67)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes-global/sstate.bbclass | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass index 21959ff13b..2dd880bbab 100644 --- a/meta/classes-global/sstate.bbclass +++ b/meta/classes-global/sstate.bbclass @@ -365,8 +365,9 @@ def sstate_installpkg(ss, d): d.setVar("SSTATE_CURRTASK", ss['task']) sstatefetch = d.getVar('SSTATE_PKGNAME') sstatepkg = d.getVar('SSTATE_PKG') + verify_sig = bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False) - if not os.path.exists(sstatepkg): + if not os.path.exists(sstatepkg) or (verify_sig and not os.path.exists(sstatepkg + '.sig')): pstaging_fetch(sstatefetch, d) if not os.path.isfile(sstatepkg): @@ -377,7 +378,7 @@ def sstate_installpkg(ss, d): d.setVar('SSTATE_INSTDIR', sstateinst) - if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False): + if verify_sig: if not os.path.isfile(sstatepkg + '.sig'): bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg) return False |