[2.8][PATCH 0/2] Patch review
Please review this set of changes for 2.8/scarthgap and have comments back by end of day Thursday, November 6
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/2676
The following changes since commit 1c9ec1ffde75809de34c10d3ec2b40d84d258cb4:
bitbake: Bump version to 2.8.1 (2025-09-17 23:22:33 +0100)
are available in the Git repository at:
https://git.openembedded.org/bitbake-contrib stable/2.8-nut
https://git.openembedded.org/bitbake-contrib/log/?h=stable/2.8-nut
Bin Lan (1):
bb/fetch2/__init__.py: remove a DeprecationWarning in uri_replace()
Philippe-Alexandre Mathieu (1):
fetch2/wget: Keep query parameters in URL during checkstatus
lib/bb/fetch2/__init__.py | 2 +- lib/bb/fetch2/wget.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.43.0
[bitbake][scarthgap][2.8][PATCH 1/2] bb/fetch2/__init__.py: remove a DeprecationWarning in uri_replace()
From: Bin Lan <[email protected]>
There is the following warning when executing to bitbake linux-yocto:
bitbake/lib/bb/fetch2/__init__.py:464: DeprecationWarning: 'count' is passed as positional argument
This is because the 4th parameter of re.sub(pattern, repl, string, count=0, flags=0) is a keyword parameter. We use keyword arguments for parameters that are not positional.
--- lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/__init__.py +1 -1
@@ -460,7 +460,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): for k in replacements: uri_replace_decoded[loc] = uri_replace_decoded[loc].replace(k, replacements[k]) #bb.note("%s %s %s" % (regexp, uri_replace_decoded[loc], uri_decoded[loc])) - result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], 1) + result_decoded[loc] = re.sub(regexp, uri_replace_decoded[loc], uri_decoded[loc], count=1) if loc == 2: # Handle path manipulations basename = None
Signature · 1 line
2.43.0
[bitbake][scarthgap][2.8][PATCH 2/2] fetch2/wget: Keep query parameters in URL during checkstatus
In reply to Steve SakomanFrom: Philippe-Alexandre Mathieu <[email protected]>
When recreating the uri in wget's checkstatus method, we only use the scheme, host and path. This completely strips the query parameters from the final URI and potentially breaks the checking functionality for URLs that require query parameters (such as the AZ fetcher with SAS token).
This bug was resolved on master in096301250455e2a83bdd818a56317c62436c9981.
This patch is adapted to the scarthgap branch.
--- lib/bb/fetch2/wget.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
lib/bb/fetch2/wget.py +5 -2
@@ -344,8 +344,11 @@ class Wget(FetchMethod): opener = urllib.request.build_opener(*handlers) try: - uri_base = ud.url.split(";")[0] - uri = "{}://{}{}".format(urllib.parse.urlparse(uri_base).scheme, ud.host, ud.path) + parts = urllib.parse.urlparse(ud.url.split(";")[0]) + 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
Signature · 1 line
2.43.0