[oe-commits] [bitbake] branch master-next updated: fetch2: Ensure we don't have file downloads overwriting each other
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 28 11:38:58 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new b8b14d9 fetch2: Ensure we don't have file downloads overwriting each other
b8b14d9 is described below
commit b8b14d975a254444461ba857fc6fb8c725de8874
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Mar 28 12:23:58 2017 +0100
fetch2: Ensure we don't have file downloads overwriting each other
Imagine you have an sstate mirror accessed over http and an SSTATE_MIRRORS
which maps file:// urls to http:// urls.
File urls set donestampneeded = False, http urls don't. This can result in
races in the try_mirror_url() code since it will trigger new downloads after
aquiring the lockfile as verify_donestamp() doesn't look at origud and there
is no donestamp.
verify_donestamp() already has code to look at origud, we're just missing
some code at the start of the function to do this. Fix it to avoid
these races.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/fetch2/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 464e66b..ea72025 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -625,7 +625,7 @@ def verify_donestamp(ud, d, origud=None):
Returns True, if the donestamp exists and is valid, False otherwise. When
returning False, any existing done stamps are removed.
"""
- if not ud.needdonestamp:
+ if not ud.needdonestamp or (origud and not origud.needdonestamp):
return True
if not os.path.exists(ud.donestamp):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list