Bug 15882

Summary: az fetcher not working as expected when using AZ_SAS, i need to prepend it with a ?
Product: [Build System, Metadata & Runtime] BitBake Reporter: Robbin Van Damme <robbinvandamme>
Component: bitbakeAssignee: Robbin Van Damme <robbinvandamme>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie
Version: 5.0.9   
Target Milestone: 5.3   
Hardware: x86   
OS: arm64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robbin Van Damme 2025-05-28 15:06:41 UTC
According to the docs we need to put our sas toking inside the AZ_SAS variable and add the use to the SRC_URI.

That does not work since in the lib/bb/fetch2/az.py the sas token gets appended to the url without a "?" in between to separate the query parameters from the url.


        if az_sas:
            azuri = '%s%s%s%s' % ('https://', ud.host, ud.path, az_sas)



This results in something like:


https://some_app.zipsp=r&st=date&se=date&spr=https&sv=date&sr=c&sig=some_sig' 

but it should be

https://some_app.zip?sp=r&st=date&se=date&spr=https&sv=date&sr=c&sig=some_sig' 



Code could be something like:


        if az_sas:
            azuri = '%s%s%s?%s' % ('https://', ud.host, ud.path, az_sas)

For now i just added the ? as prefix to the AZ_SAS inside my recipe.

Kind regards,

Robbin
Comment 1 Randy MacLeod 2025-05-29 14:44:53 UTC
Patch sent to list but it needs a commit message and signed-of-by line.
Comment 2 Richard Purdie 2025-06-04 14:34:14 UTC
In the end we've added a warning if the ? is missing:

https://git.yoctoproject.org/poky/commit/?id=a2f77bbe0fd564e0b95df15c27f2c6a3b15c7be7

Thanks for the patch Robbin.