diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2021-11-09 11:11:47 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-16 22:20:33 +0000 |
commit | e7acdb37af9c1b5e9d7bc0f6fd549c3c14a19d53 (patch) | |
tree | df72ec096e627a34de28452a8ccfc8cfbdfd3335 /meta/classes | |
parent | 52b768d70085f1b408f59d5654209d9004fd3393 (diff) | |
download | poky-e7acdb37af9c1b5e9d7bc0f6fd549c3c14a19d53.tar.gz |
sstate: only search on the mirrors for the missing files
The existence of missed files on the local sstate cache is the
condition to search for it on the sstate mirror.
The missed collection are populated when we search the files
on the local sstate cache.
- When we have sstate mirrors we don't need to iterate all files
again because we already know what's missing.
- When we found a file on the sstate mirror is because of they
are missing on the local sstate mirror.
So avoid checking if the hash exists on the missed collection.
- When we can't find the file on the sstate mirror we don't need
to add the hash again to the missed collection as it already exists.
(From OE-Core rev: 46e1f9a900e2be1abeda0dc540fc14040ecd0d7c)
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sstate.bbclass | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 3f6a1fe99f..88bd84a06c 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -989,10 +989,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
989 | fetcher.checkstatus() | 989 | fetcher.checkstatus() |
990 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) | 990 | bb.debug(2, "SState: Successful fetch test for %s" % srcuri) |
991 | found.add(tid) | 991 | found.add(tid) |
992 | if tid in missed: | 992 | missed.remove(tid) |
993 | missed.remove(tid) | ||
994 | except bb.fetch2.FetchError as e: | 993 | except bb.fetch2.FetchError as e: |
995 | missed.add(tid) | ||
996 | bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, e)) | 994 | bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, e)) |
997 | except Exception as e: | 995 | except Exception as e: |
998 | bb.error("SState: cannot test %s: %s" % (srcuri, e)) | 996 | bb.error("SState: cannot test %s: %s" % (srcuri, e)) |
@@ -1001,9 +999,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True, | |||
1001 | bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d) | 999 | bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d) |
1002 | 1000 | ||
1003 | tasklist = [] | 1001 | tasklist = [] |
1004 | for tid in sq_data['hash']: | 1002 | for tid in missed: |
1005 | if tid in found: | ||
1006 | continue | ||
1007 | spec, extrapath, tname = getpathcomponents(tid, d) | 1003 | spec, extrapath, tname = getpathcomponents(tid, d) |
1008 | sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) | 1004 | sstatefile = d.expand(extrapath + generate_sstatefn(spec, gethash(tid), tname, siginfo, d)) |
1009 | tasklist.append((tid, sstatefile)) | 1005 | tasklist.append((tid, sstatefile)) |