Skip to contentSkip to conversation

go-mod-update-modules: Combine env with fetcher environment

PATCH New Michal Sieron 1 participant 1 message Sep 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 go-mod-update-modules: Combine env with fetcher environment

Running do_update_modules from behind a FW fails with i/o timeout. Compare that with do_fetch which propagates proxy related ENV variables.

Add **bb.fetch.get_fetcher_environment(d) when constructing environment for go invocations so that all proxy variables are present.

---
 meta/classes-recipe/go-mod-update-modules.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/go-mod-update-modules.bbclass +1 -1
index 3a0f0a3377..435e7e30ff 100644
@@ -45,7 +45,7 @@ python do_update_modules() {
 
 """
 
-        env = dict(os.environ, GOMODCACHE=mod_cache_dir)
+        env = dict(os.environ, **bb.fetch.get_fetcher_environment(d), GOMODCACHE=mod_cache_dir)
         source = d.expand("${UNPACKDIR}/${GO_SRCURI_DESTSUFFIX}")
         go_install = d.getVar("GO_INSTALL").split()
         output = subprocess.check_output(("go", "list", "-json=Dir,Module", "-deps", *go_install),

---
base-commit: efa6b98ee50bd0b115fb7d1395079cef008d246d
change-id: 20260924-msieron-proxy-go-update-modules-f3ef163069e0

Best regards,

Signature · 1 line
Michal Sieron <[email protected]>