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.

Signed-off-by: Michal Sieron <[email protected]>
---
 meta/classes-recipe/go-mod-update-modules.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/go-mod-update-modules.bbclass 
b/meta/classes-recipe/go-mod-update-modules.bbclass
index 3a0f0a3377..435e7e30ff 100644
--- a/meta/classes-recipe/go-mod-update-modules.bbclass
+++ b/meta/classes-recipe/go-mod-update-modules.bbclass
@@ -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,
--  
Michal Sieron <[email protected]>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246581): 
https://lists.openembedded.org/g/openembedded-core/message/246581
Mute This Topic: https://lists.openembedded.org/mt/121407631/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to