summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hagelborn <tobias.hagelborn@axis.com>2023-01-30 15:20:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-02 10:27:30 +0000
commit4b85b092133dc62057b92c2390e7020848d256f5 (patch)
tree9cf3df814371ba747a4177d1facdb310e3938be6
parentc79127dcb17dc2ab4ebb8f07a86e33b02cec5bdb (diff)
downloadpoky-4b85b092133dc62057b92c2390e7020848d256f5.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). (From OE-Core rev: d5ea1a5396bf9fd4303cae46bc0e042be8de8d67) 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>
-rw-r--r--meta/classes-global/sstate.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 77e3ea34e1..567de4aba4 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -365,8 +365,9 @@ def sstate_installpkg(ss, d):
365 d.setVar("SSTATE_CURRTASK", ss['task']) 365 d.setVar("SSTATE_CURRTASK", ss['task'])
366 sstatefetch = d.getVar('SSTATE_PKGNAME') 366 sstatefetch = d.getVar('SSTATE_PKGNAME')
367 sstatepkg = d.getVar('SSTATE_PKG') 367 sstatepkg = d.getVar('SSTATE_PKG')
368 verify_sig = bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False)
368 369
369 if not os.path.exists(sstatepkg): 370 if not os.path.exists(sstatepkg) or (verify_sig and not os.path.exists(sstatepkg + '.sig')):
370 pstaging_fetch(sstatefetch, d) 371 pstaging_fetch(sstatefetch, d)
371 372
372 if not os.path.isfile(sstatepkg): 373 if not os.path.isfile(sstatepkg):
@@ -377,7 +378,7 @@ def sstate_installpkg(ss, d):
377 378
378 d.setVar('SSTATE_INSTDIR', sstateinst) 379 d.setVar('SSTATE_INSTDIR', sstateinst)
379 380
380 if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False): 381 if verify_sig:
381 if not os.path.isfile(sstatepkg + '.sig'): 382 if not os.path.isfile(sstatepkg + '.sig'):
382 bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg) 383 bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg)
383 return False 384 return False