summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/gomod.py
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2025-01-07 10:17:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-08 11:34:04 +0000
commitd7c6afc9a97407238af814777f9148dedd507192 (patch)
treee4abce959656d379fa3fac1e826a293f3a293799 /bitbake/lib/bb/fetch2/gomod.py
parente040b45ad211c773d8e557cc61d91ef73a98993d (diff)
downloadpoky-d7c6afc9a97407238af814777f9148dedd507192.tar.gz
bitbake: fetch2: do not prefix embedded checksums
The fetcher support entries with an embedded checksum like 'sha256sum' in the SRC_URI. It adds the parameter 'name' as prefix to the checksums if the parameter is set. This behavior is unexpected and leads to hacks in fetchers. Fallback to the checksum without the useless prefix and set the parameter 'name' in the gomod fetcher unconditional. (Bitbake rev: 7a86c5a20ea2586f1ae240613644e065e7b21683) Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/gomod.py')
-rw-r--r--bitbake/lib/bb/fetch2/gomod.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/gomod.py b/bitbake/lib/bb/fetch2/gomod.py
index 21fbe80f56..6c999e8ba0 100644
--- a/bitbake/lib/bb/fetch2/gomod.py
+++ b/bitbake/lib/bb/fetch2/gomod.py
@@ -119,10 +119,7 @@ class GoMod(Wget):
119 ('https', proxy, '/' + path, None, None, None)) 119 ('https', proxy, '/' + path, None, None, None))
120 ud.parm['downloadfilename'] = path 120 ud.parm['downloadfilename'] = path
121 121
122 # Set name parameter if sha256sum is set in recipe 122 ud.parm['name'] = f"{module}@{ud.parm['version']}"
123 name = f"{module}@{ud.parm['version']}"
124 if d.getVarFlag('SRC_URI', name + '.sha256sum'):
125 ud.parm['name'] = name
126 123
127 # Set subdir for unpack 124 # Set subdir for unpack
128 ud.parm['subdir'] = os.path.join(moddir, 'cache/download', 125 ud.parm['subdir'] = os.path.join(moddir, 'cache/download',