diff options
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 3c179259e7..5736474f4c 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -912,8 +912,6 @@ BB_HASHCHECK_FUNCTION = "sstate_checkhashes" | |||
912 | 912 | ||
913 | def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): | 913 | def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): |
914 | found = set() | 914 | found = set() |
915 | foundLocal = set() | ||
916 | foundNet = set() | ||
917 | missed = set() | 915 | missed = set() |
918 | 916 | ||
919 | def gethash(task): | 917 | def gethash(task): |
@@ -944,14 +942,13 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
944 | sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) | 942 | sstatefile = d.expand("${SSTATE_DIR}/" + extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) |
945 | 943 | ||
946 | if os.path.exists(sstatefile): | 944 | if os.path.exists(sstatefile): |
947 | bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) | ||
948 | found.add(tid) | 945 | found.add(tid) |
949 | foundLocal.add(tid) | 946 | bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) |
950 | continue | ||
951 | else: | 947 | else: |
952 | missed.add(tid) | 948 | missed.add(tid) |
953 | bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile) | 949 | bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile) |
954 | 950 | ||
951 | foundLocal = len(found) | ||
955 | mirrors = d.getVar("SSTATE_MIRRORS") | 952 | mirrors = d.getVar("SSTATE_MIRRORS") |
956 | if mirrors: | 953 | if mirrors: |
957 | # Copy the data object and override DL_DIR and SRC_URI | 954 | # Copy the data object and override DL_DIR and SRC_URI |
@@ -992,7 +989,6 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
992 | fetcher.checkstatus() | 989 | fetcher.checkstatus() |
993 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) | 990 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) |
994 | found.add(tid) | 991 | found.add(tid) |
995 | foundNet.add(tid) | ||
996 | if tid in missed: | 992 | if tid in missed: |
997 | missed.remove(tid) | 993 | missed.remove(tid) |
998 | except bb.fetch2.FetchError as e: | 994 | except bb.fetch2.FetchError as e: |
@@ -1054,7 +1050,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
1054 | match = 0 | 1050 | match = 0 |
1055 | if total: | 1051 | if total: |
1056 | match = len(found) / total * 100 | 1052 | match = len(found) / total * 100 |
1057 | bb.plain("Sstate summary: Wanted %d Local %d Network %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(foundLocal), len(foundNet),len(missed), currentcount, match, complete)) | 1053 | bb.plain("Sstate summary: Wanted %d Local %d Mirrors %d Missed %d Current %d (%d%% match, %d%% complete)" % |
1054 | (total, foundLocal, len(found)-foundLocal, len(missed), currentcount, match, complete)) | ||
1058 | 1055 | ||
1059 | if hasattr(bb.parse.siggen, "checkhashes"): | 1056 | if hasattr(bb.parse.siggen, "checkhashes"): |
1060 | bb.parse.siggen.checkhashes(sq_data, missed, found, d) | 1057 | bb.parse.siggen.checkhashes(sq_data, missed, found, d) |