From bd5a07fbcb6d12414975a38b0920eb9df79042fd Mon Sep 17 00:00:00 2001 From: Caner Altinbasak Date: Wed, 13 Oct 2021 13:14:42 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 63e619ab98..666cc1306a 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -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): -- cgit v1.2.3-54-g00ecf