Message ID | 20250725111347.1812105-1-alexander.merkle@lauterbach.com |
---|---|
State | New |
Headers | show |
Series | bitbake: forward proxy env variables if network access is enabled | expand |
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index d2b146a6a9..4012a1a1fb 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker @@ -292,6 +292,10 @@ def fork_off_task(cfg, data, databuilder, workerdata, extraconfigdata, runtask): exports = bb.data.exported_vars(the_data) bb.utils.empty_environment() + + if bb.utils.to_boolean(the_data.getVarFlag(taskname, 'network')): + bb.utils.export_proxies(the_data) + for e, v in exports: os.environ[e] = v
For steps that set `network` manually e.g. `do_compile[network] = "1"` the proxy environment variables should be forwarded. Otherwise the step may not have full access when corporate proxies are used. There seem to be various examples around that use e.g. the go.bbclass which downloads modules while the `do_compile` step. Signed-off-by: Alexander Merkle <alexander.merkle@lauterbach.com> --- bitbake/bin/bitbake-worker | 4 ++++ 1 file changed, 4 insertions(+)