diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-06-27 14:48:48 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-01 08:49:37 +0100 |
| commit | 43434a79c0ac8b0e7a7a5da8730b03af0dc17fd5 (patch) | |
| tree | 53416e7e4eccf7be3782e9c7bb6fd392d1c4b4e9 /meta | |
| parent | 9291f67f1e01fe58dab7c28cbc2bd443da7950dc (diff) | |
| download | poky-43434a79c0ac8b0e7a7a5da8730b03af0dc17fd5.tar.gz | |
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 <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes-recipe/go-mod-update-modules.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
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() { | |||
| 48 | 48 | ||
| 49 | env = dict(os.environ, GOMODCACHE=mod_cache_dir) | 49 | env = dict(os.environ, GOMODCACHE=mod_cache_dir) |
| 50 | 50 | ||
| 51 | source = d.expand("${WORKDIR}/${GO_SRCURI_DESTSUFFIX}") | 51 | source = d.expand("${UNPACKDIR}/${GO_SRCURI_DESTSUFFIX}") |
| 52 | output = subprocess.check_output(("go", "mod", "edit", "-json"), cwd=source, env=env, text=True) | 52 | output = subprocess.check_output(("go", "mod", "edit", "-json"), cwd=source, env=env, text=True) |
| 53 | go_mod = json.loads(output) | 53 | go_mod = json.loads(output) |
| 54 | 54 | ||
| @@ -78,7 +78,7 @@ python do_update_modules() { | |||
| 78 | 78 | ||
| 79 | mod_dir = mod['Dir'] | 79 | mod_dir = mod['Dir'] |
| 80 | 80 | ||
| 81 | if mod_dir.startswith(s_dir): | 81 | if not mod_dir.startswith(mod_cache_dir): |
| 82 | continue | 82 | continue |
| 83 | 83 | ||
| 84 | path = os.path.relpath(mod_dir, mod_cache_dir) | 84 | path = os.path.relpath(mod_dir, mod_cache_dir) |
