diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-10 19:39:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-11 19:08:02 +0100 |
commit | 6ede10595349dcba0cac6f421f5af90403420f0e (patch) | |
tree | e02d3bf72165c710ae0c85be992822f93813ec54 /meta/classes/sstate.bbclass | |
parent | 8f8facbed42afb186a92f314bf2f04c5858f0c3e (diff) | |
download | poky-6ede10595349dcba0cac6f421f5af90403420f0e.tar.gz |
sstate: Add level 2 debug so its possible to see what sstate is doing
Currently its hard to figure out if/when sstate is checking for possible
packages to speed up builds. This patch adds level 2 debug output which
better indicates what files are being searched for an why.
[YOCTO #1259]
(From OE-Core rev: a752b23767189f2678367e47ca0b41f49c56a631)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-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 |