From 43434a79c0ac8b0e7a7a5da8730b03af0dc17fd5 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 27 Jun 2025 14:48:48 +0100 Subject: recipetool/create_go: proxy module fetching to go-mod-update-modules Now that the go-mod-update-modules class exists, this Go handler can create a stub recipe and then proxy the module handling to the class. (From OE-Core rev: 0aa406d0582d32399c48dfa78f24adc75696112c) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/classes-recipe/go-mod-update-modules.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/classes-recipe/go-mod-update-modules.bbclass b/meta/classes-recipe/go-mod-update-modules.bbclass index 6ef7ab553b..5fccd0bb0d 100644 --- a/meta/classes-recipe/go-mod-update-modules.bbclass +++ b/meta/classes-recipe/go-mod-update-modules.bbclass @@ -48,7 +48,7 @@ python do_update_modules() { env = dict(os.environ, GOMODCACHE=mod_cache_dir) - source = d.expand("${WORKDIR}/${GO_SRCURI_DESTSUFFIX}") + source = d.expand("${UNPACKDIR}/${GO_SRCURI_DESTSUFFIX}") output = subprocess.check_output(("go", "mod", "edit", "-json"), cwd=source, env=env, text=True) go_mod = json.loads(output) @@ -78,7 +78,7 @@ python do_update_modules() { mod_dir = mod['Dir'] - if mod_dir.startswith(s_dir): + if not mod_dir.startswith(mod_cache_dir): continue path = os.path.relpath(mod_dir, mod_cache_dir) -- cgit v1.2.3-54-g00ecf