* [PATCH] fetch2/wget: Keep query parameters in URL during checkstatus
@ 2025-07-17 21:02 Philippe-Alexandre Mathieu
2025-07-18 11:55 ` [bitbake-devel] " Mathieu Dubois-Briand
0 siblings, 1 reply; 2+ messages in thread
From: Philippe-Alexandre Mathieu @ 2025-07-17 21:02 UTC (permalink / raw)
To: bitbake-devel; +Cc: Philippe-Alexandre Mathieu
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.
Signed-off-by: Philippe-Alexandre Mathieu <pamathieu@poum.ca>
---
bitbake/lib/bb/fetch2/wget.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 7e43d3bc97..c8870b18ad 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -372,7 +372,7 @@ class Wget(FetchMethod):
try:
parts = urllib.parse.urlparse(ud.url.split(";")[0])
- uri = "{}://{}{}".format(parts.scheme, parts.netloc, parts.path)
+ uri = "{}://{}{}?{}".format(parts.scheme, parts.netloc, parts.path, parts.query)
r = urllib.request.Request(uri)
r.get_method = lambda: "HEAD"
# Some servers (FusionForge, as used on Alioth) require that the
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [bitbake-devel] [PATCH] fetch2/wget: Keep query parameters in URL during checkstatus
2025-07-17 21:02 [PATCH] fetch2/wget: Keep query parameters in URL during checkstatus Philippe-Alexandre Mathieu
@ 2025-07-18 11:55 ` Mathieu Dubois-Briand
0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Dubois-Briand @ 2025-07-18 11:55 UTC (permalink / raw)
To: pamathieu, bitbake-devel
On Thu Jul 17, 2025 at 11:02 PM CEST, Philippe-Alexandre Mathieu via lists.openembedded.org wrote:
> 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.
>
> Signed-off-by: Philippe-Alexandre Mathieu <pamathieu@poum.ca>
> ---
Hi Philippe-Alexandre,
Thanks for your patch,
It looks like this is breaking bitbake selftests:
FAIL: test_wget_checkstatus (bb.tests.fetch.FetchCheckStatusTest.test_wget_checkstatus) (url='ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz')
...
AssertionError: False is not true : URI ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz, can't check status
...
FAIL: test_wget_checkstatus_connection_cache (bb.tests.fetch.FetchCheckStatusTest.test_wget_checkstatus_connection_cache) (url='ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz')
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1984
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/1920
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2139
Can you have a look at these failures please?
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-18 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 21:02 [PATCH] fetch2/wget: Keep query parameters in URL during checkstatus Philippe-Alexandre Mathieu
2025-07-18 11:55 ` [bitbake-devel] " Mathieu Dubois-Briand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.