Skip to content

Commit

Permalink
bitbake: fetch2: Do not attempt to verify donestamp if download is no…
Browse files Browse the repository at this point in the history
…t 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: 5386296b1a4719f12d4ba0863d96ee80ba4fa94a)

Signed-off-by: Caner Altinbasak <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
  • Loading branch information
Caner Altinbasak authored and rpurdie committed Oct 13, 2021
1 parent 22995d5 commit 14811c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bitbake/lib/bb/fetch2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,9 @@ def download(self, urls=None):
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):
Expand Down

0 comments on commit 14811c9

Please sign in to comment.