summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPhilippe-Alexandre Mathieu <pamathieu@poum.ca>2025-07-18 10:43:37 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-28 14:51:50 +0100
commit18c6ff0ae12f6b48bc53c8230bf06e01a8d8681d (patch)
treef0ce0ba8dff2df7e51994467543a5a0f35dc3d37 /bitbake
parentbd4625cd4db0f02162092d85aeab3023914f768a (diff)
downloadpoky-18c6ff0ae12f6b48bc53c8230bf06e01a8d8681d.tar.gz
bitbake: fetch2/wget: Keep query parameters in URL during checkstatus
When recreating the uri in wget's checkstatus method, we only use the scheme, netloc and path. This completely strips the query parameters from the final URI and potentially breaks the checking functionality from certain fetchers. This is the case for the Azure storage fetcher, as it requires a SAS token that is formatted as a series of query parameters. The error manifests itself when using a private storage account as a PREMIRROR or SSTATE_MIRROR (since regular SRC_URI won't run the checkstatus). This problem is present in scarthgap, but wasn't in kirkstone. CC: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> (Bitbake rev: 096301250455e2a83bdd818a56317c62436c9981) Signed-off-by: Philippe-Alexandre Mathieu <pamathieu@poum.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 7e43d3bc97..4d19e2134b 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -372,7 +372,10 @@ class Wget(FetchMethod):
372 372
373 try: 373 try:
374 parts = urllib.parse.urlparse(ud.url.split(";")[0]) 374 parts = urllib.parse.urlparse(ud.url.split(";")[0])
375 uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path) 375 if parts.query:
376 uri = "{}://{}{}?{}".format(parts.scheme, parts.netloc, parts.path, parts.query)
377 else:
378 uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path)
376 r = urllib.request.Request(uri) 379 r = urllib.request.Request(uri)
377 r.get_method = lambda: "HEAD" 380 r.get_method = lambda: "HEAD"
378 # Some servers (FusionForge, as used on Alioth) require that the 381 # Some servers (FusionForge, as used on Alioth) require that the