bitbake: fetch2: Do not attempt to verify donestamp if download is not complete

npmsw(and maybe other fetchers) may try to download same files simulatenously.

if a premirror is set, download method tries premirror location first. If file
is not found, done is set to false. In the meantime, other fetchers may download
the files required and verify_donestamp might return true.

In this scenerio, fetcher doesn't try to download again and fails. Do not
attempt to verify_donestamp if done is not set. By this way, we ensure that
fetcher attempts to do another download after premirror failure.

(Bitbake rev: 4fa25714916e84f99ecd22cb76cb5adada01e5e8)

Signed-off-by: Caner Altinbasak <cal@brightsign.biz>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Caner Altinbasak 2021-10-13 13:14:42 +01:00 committed by Richard Purdie
parent 8e6aaed8ff
commit bd5a07fbcb

View File

@ -1721,7 +1721,9 @@ class Fetch(object):
self.d.setVar("BB_NO_NETWORK", "1")
firsterr = None
verified_stamp = m.verify_donestamp(ud, self.d)
verified_stamp = False
if done:
verified_stamp = m.verify_donestamp(ud, self.d)
if not done and (not verified_stamp or m.need_update(ud, self.d)):
try:
if not trusted_network(self.d, ud.url):