diff options
| -rw-r--r-- | meta/classes/sstate.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index c057cc7441..d7631cac5c 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
| @@ -477,10 +477,12 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | |||
| 477 | for task in range(len(sq_fn)): | 477 | for task in range(len(sq_fn)): |
| 478 | sstatefile = bb.data.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz", d) | 478 | sstatefile = bb.data.expand("${SSTATE_DIR}/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz", d) |
| 479 | sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task]) | 479 | sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task]) |
| 480 | #print("Checking for %s" % sstatefile) | ||
| 481 | if os.path.exists(sstatefile): | 480 | if os.path.exists(sstatefile): |
| 481 | bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) | ||
| 482 | ret.append(task) | 482 | ret.append(task) |
| 483 | continue | 483 | continue |
| 484 | else: | ||
| 485 | bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile) | ||
| 484 | 486 | ||
| 485 | mirrors = bb.data.getVar("SSTATE_MIRRORS", d, True) | 487 | mirrors = bb.data.getVar("SSTATE_MIRRORS", d, True) |
| 486 | if mirrors: | 488 | if mirrors: |
| @@ -492,6 +494,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | |||
| 492 | bb.data.setVar('DL_DIR', dldir, localdata) | 494 | bb.data.setVar('DL_DIR', dldir, localdata) |
| 493 | bb.data.setVar('PREMIRRORS', mirrors, localdata) | 495 | bb.data.setVar('PREMIRRORS', mirrors, localdata) |
| 494 | 496 | ||
| 497 | bb.debug(2, "SState using premirror of: %s" % mirrors) | ||
| 498 | |||
| 495 | for task in range(len(sq_fn)): | 499 | for task in range(len(sq_fn)): |
| 496 | if task in ret: | 500 | if task in ret: |
| 497 | continue | 501 | continue |
| @@ -501,13 +505,15 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): | |||
| 501 | 505 | ||
| 502 | srcuri = "file://" + os.path.basename(sstatefile) | 506 | srcuri = "file://" + os.path.basename(sstatefile) |
| 503 | bb.data.setVar('SRC_URI', srcuri, localdata) | 507 | bb.data.setVar('SRC_URI', srcuri, localdata) |
| 504 | #bb.note(str(srcuri)) | 508 | bb.debug(2, "SState: Attempting to fetch %s" % srcuri) |
| 505 | 509 | ||
| 506 | try: | 510 | try: |
| 507 | fetcher = bb.fetch2.Fetch(srcuri.split(), localdata) | 511 | fetcher = bb.fetch2.Fetch(srcuri.split(), localdata) |
| 508 | fetcher.checkstatus() | 512 | fetcher.checkstatus() |
| 513 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) | ||
| 509 | ret.append(task) | 514 | ret.append(task) |
| 510 | except: | 515 | except: |
| 516 | bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) | ||
| 511 | pass | 517 | pass |
| 512 | 518 | ||
| 513 | return ret | 519 | return ret |
