diff options
author | Alejandro Hernandez Samaniego <alejandro@enedino.org> | 2021-02-18 00:48:25 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-19 11:17:11 +0000 |
commit | cc0e18a7f71042ece794813326675e5c5d058e66 (patch) | |
tree | c28fad637c60f01c360bb88f05b7a378d15f69e5 /meta | |
parent | b20dd9b0a30e5af5bd62848bf56edf7b97ae900b (diff) | |
download | poky-cc0e18a7f71042ece794813326675e5c5d058e66.tar.gz |
sstate.bbclass: Split sstate summary into locally and network found artifacts
Modify sstate class to add extra output, differentiating
between artifacts found locally and those found over the network.
(From OE-Core rev: f017a2f677fa289c36b0e56ce480f69d7674ca11)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index d08d950e76..f579168162 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -862,6 +862,8 @@ BB_HASHCHECK_FUNCTION = "sstate_checkhashes" | |||
862 | 862 | ||
863 | def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): | 863 | def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, **kwargs): |
864 | found = set() | 864 | found = set() |
865 | foundLocal = set() | ||
866 | foundNet = set() | ||
865 | missed = set() | 867 | missed = set() |
866 | 868 | ||
867 | def gethash(task): | 869 | def gethash(task): |
@@ -894,6 +896,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
894 | if os.path.exists(sstatefile): | 896 | if os.path.exists(sstatefile): |
895 | bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) | 897 | bb.debug(2, "SState: Found valid sstate file %s" % sstatefile) |
896 | found.add(tid) | 898 | found.add(tid) |
899 | foundLocal.add(tid) | ||
897 | continue | 900 | continue |
898 | else: | 901 | else: |
899 | missed.add(tid) | 902 | missed.add(tid) |
@@ -939,6 +942,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
939 | fetcher.checkstatus() | 942 | fetcher.checkstatus() |
940 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) | 943 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) |
941 | found.add(tid) | 944 | found.add(tid) |
945 | foundNet.add(tid) | ||
942 | if tid in missed: | 946 | if tid in missed: |
943 | missed.remove(tid) | 947 | missed.remove(tid) |
944 | except: | 948 | except: |
@@ -1000,7 +1004,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
1000 | match = 0 | 1004 | match = 0 |
1001 | if total: | 1005 | if total: |
1002 | match = len(found) / total * 100 | 1006 | match = len(found) / total * 100 |
1003 | bb.plain("Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)" % (total, len(found), len(missed), currentcount, match, complete)) | 1007 | 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)) |
1004 | 1008 | ||
1005 | if hasattr(bb.parse.siggen, "checkhashes"): | 1009 | if hasattr(bb.parse.siggen, "checkhashes"): |
1006 | bb.parse.siggen.checkhashes(sq_data, missed, found, d) | 1010 | bb.parse.siggen.checkhashes(sq_data, missed, found, d) |