aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Weaver <weaverjs@gmail.com>2021-09-05 18:27:36 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-06 10:19:06 +0100
commit8a3ff9f3eaf19d4258eb070c5dc230dface269b2 (patch)
tree3aeacb1dfc00aa8f99551d9f237b84e3697ad191
parent7816a8de70adc3806a3739384cf08b281b4ee401 (diff)
downloadbitbake-8a3ff9f3eaf19d4258eb070c5dc230dface269b2.tar.gz
bitbake: fetch2: fix premirror URI when downloadfilename defined
When downloadfilename is defined in a recipe's SRC_URI and PREMIRRORS is also defined using the same URI, the downloadfilename is appended to the mirror URI and it should not be. [YOCTO #13039] Signed-off-by: Scott Weaver <weaverjs@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 914fa5c02..47a494336 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -466,7 +466,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
# Kill parameters, they make no sense for mirror tarballs
uri_decoded[5] = {}
elif ud.localpath and ud.method.supports_checksum(ud):
- basename = os.path.basename(ud.localpath)
+ basename = os.path.basename(uri_decoded[loc])
if basename and not result_decoded[loc].endswith(basename):
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
else: