From 8e71d0e21b7bdcdfaf1db514708e345987cca7a3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 19 Feb 2022 17:57:10 +0000 Subject: bitbake: fetch2: Abstract fetcher environment to a function The changing of the environment inside the wget fetcher can race if threading is used, such as with sstate in OE-Core. Abstract the function so the environment can be correct before the function is called, removing the race since the enviroment is then no longer changed. (Bitbake rev: c73bb6023c73f003a160bb02aa4da1b580b86c23) Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/wget.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'bitbake/lib/bb/fetch2/wget.py') diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 92cc10785c..b3a3de571a 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -315,14 +315,7 @@ class Wget(FetchMethod): # Avoid tramping the environment too much by using bb.utils.environment # to scope the changes to the build_opener request, which is when the # environment lookups happen. - newenv = {} - origenv = d.getVar("BB_ORIGENV") - for name in bb.fetch2.FETCH_EXPORT_VARS: - value = d.getVar(name) - if not value and origenv: - value = origenv.getVar(name) - if value: - newenv[name] = value + newenv = bb.fetch2.get_fetcher_environment(d) with bb.utils.environment(**newenv): import ssl -- cgit v1.2.3-54-g00ecf