mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 03:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
bd4625cd4d
commit
18c6ff0ae1
@@ -372,7 +372,10 @@ class Wget(FetchMethod):
|
||||
|
||||
try:
|
||||
parts = urllib.parse.urlparse(ud.url.split(";")[0])
|
||||
uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path)
|
||||
if parts.query:
|
||||
uri = "{}://{}{}?{}".format(parts.scheme, parts.netloc, parts.path, parts.query)
|
||||
else:
|
||||
uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path)
|
||||
r = urllib.request.Request(uri)
|
||||
r.get_method = lambda: "HEAD"
|
||||
# Some servers (FusionForge, as used on Alioth) require that the
|
||||
|
||||
Reference in New Issue
Block a user