summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2020-05-13 11:12:48 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-05 21:36:30 +0100
commit45d742b0e0fef1035cd14bf70fb763857f5a63b0 (patch)
tree0ab071e77275fe291beb33e5e76cebc5e088eb17 /meta/classes
parent4c582f5cf123c70678a8f0fea77a5b3504eb6f8d (diff)
downloadpoky-45d742b0e0fef1035cd14bf70fb763857f5a63b0.tar.gz
sstate.bbclass: When siginfo or sig files are missing, stop fetcher errors
Prior to fetching, the system checks if the sstate file is present either locally or on the mirror. If it is, then it goes to the fetch stage. Up to three files can be fetched, sstate, sstate.siginfo and sstate.sig (if signature validation is enabled). The previous pstaging_fetch function would iterate over these, and if a download error occurred would spew forth a great amount of fetcher failure messages as well as stop fetching the next item in the set. This was resolved by adding a fetcher.checkstatus() call prior to the download. If the file isn't present, then the exception will be triggered, and no fetcher failure messages will reach the user. The exception handler is then modified to be a pass so that it will loop and pull the rest of the files that that are requested. Additionally, a check for the existance of the .sig file was added to the sstate_installpkg to avoid an error trying to load the .sig if it wasn't downloaded. (From OE-Core rev: ec58532ab6fc6343144da67789c928c751d36c06) Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a9085140434e2d26c0bb75bb53fcb7f7c19ef86d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index aa9c30b4e1..375196ef21 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -355,6 +355,9 @@ def sstate_installpkg(ss, d):
355 d.setVar('SSTATE_INSTDIR', sstateinst) 355 d.setVar('SSTATE_INSTDIR', sstateinst)
356 356
357 if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False): 357 if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG"), False):
358 if not os.path.isfile(sstatepkg + '.sig'):
359 bb.warn("No signature file for sstate package %s, skipping acceleration..." % sstatepkg)
360 return False
358 signer = get_signer(d, 'local') 361 signer = get_signer(d, 'local')
359 if not signer.verify(sstatepkg + '.sig'): 362 if not signer.verify(sstatepkg + '.sig'):
360 bb.warn("Cannot verify signature on sstate package %s, skipping acceleration..." % sstatepkg) 363 bb.warn("Cannot verify signature on sstate package %s, skipping acceleration..." % sstatepkg)
@@ -733,10 +736,11 @@ def pstaging_fetch(sstatefetch, d):
733 localdata.setVar('SRC_URI', srcuri) 736 localdata.setVar('SRC_URI', srcuri)
734 try: 737 try:
735 fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False) 738 fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
739 fetcher.checkstatus()
736 fetcher.download() 740 fetcher.download()
737 741
738 except bb.fetch2.BBFetchException: 742 except bb.fetch2.BBFetchException:
739 break 743 pass
740 744
741def sstate_setscene(d): 745def sstate_setscene(d):
742 shared_state = sstate_state_fromvars(d) 746 shared_state = sstate_state_fromvars(d)