diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 3aa4371c39..28dc312808 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -224,8 +224,6 @@ def sstate_installpkg(ss, d): | |||
224 | 224 | ||
225 | if not os.path.exists(sstatepkg): | 225 | if not os.path.exists(sstatepkg): |
226 | pstaging_fetch(sstatefetch, sstatepkg, d) | 226 | pstaging_fetch(sstatefetch, sstatepkg, d) |
227 | if not os.path.exists(sstatepkg + ".siginfo"): | ||
228 | pstaging_fetch(sstatefetch + ".siginfo", sstatepkg + ".siginfo", d) | ||
229 | 227 | ||
230 | if not os.path.isfile(sstatepkg): | 228 | if not os.path.isfile(sstatepkg): |
231 | bb.note("Staging package %s does not exist" % sstatepkg) | 229 | bb.note("Staging package %s does not exist" % sstatepkg) |
@@ -504,30 +502,30 @@ def pstaging_fetch(sstatefetch, sstatepkg, d): | |||
504 | bb.data.update_data(localdata) | 502 | bb.data.update_data(localdata) |
505 | 503 | ||
506 | dldir = localdata.expand("${SSTATE_DIR}") | 504 | dldir = localdata.expand("${SSTATE_DIR}") |
507 | srcuri = "file://" + sstatefetch | ||
508 | |||
509 | bb.mkdirhier(dldir) | 505 | bb.mkdirhier(dldir) |
510 | 506 | ||
511 | localdata.delVar('MIRRORS') | 507 | localdata.delVar('MIRRORS') |
512 | localdata.delVar('FILESPATH') | 508 | localdata.delVar('FILESPATH') |
513 | localdata.setVar('DL_DIR', dldir) | 509 | localdata.setVar('DL_DIR', dldir) |
514 | localdata.setVar('PREMIRRORS', mirrors) | 510 | localdata.setVar('PREMIRRORS', mirrors) |
515 | localdata.setVar('SRC_URI', srcuri) | ||
516 | 511 | ||
517 | # Try a fetch from the sstate mirror, if it fails just return and | 512 | # Try a fetch from the sstate mirror, if it fails just return and |
518 | # we will build the package | 513 | # we will build the package |
519 | try: | 514 | for srcuri in ['file://{0}'.format(sstatefetch), |
520 | fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False) | 515 | 'file://{0}.siginfo'.format(sstatefetch)]: |
521 | fetcher.download() | 516 | localdata.setVar('SRC_URI', srcuri) |
522 | 517 | try: | |
523 | # Need to optimise this, if using file:// urls, the fetcher just changes the local path | 518 | fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False) |
524 | # For now work around by symlinking | 519 | fetcher.download() |
525 | localpath = bb.data.expand(fetcher.localpath(srcuri), localdata) | 520 | |
526 | if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg): | 521 | # Need to optimise this, if using file:// urls, the fetcher just changes the local path |
527 | os.symlink(localpath, sstatepkg) | 522 | # For now work around by symlinking |
528 | 523 | localpath = bb.data.expand(fetcher.localpath(srcuri), localdata) | |
529 | except bb.fetch2.BBFetchException: | 524 | if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg): |
530 | pass | 525 | os.symlink(localpath, sstatepkg) |
526 | |||
527 | except bb.fetch2.BBFetchException: | ||
528 | break | ||
531 | 529 | ||
532 | def sstate_setscene(d): | 530 | def sstate_setscene(d): |
533 | shared_state = sstate_state_fromvars(d) | 531 | shared_state = sstate_state_fromvars(d) |