mirror of
https://git.yoctoproject.org/poky
synced 2026-07-16 15:57:04 +00:00
bitbake: fetch/az: Add sanity check and clarify documentation
AZ_SAS token should be prefixed with a question mark. Add a sanity check for this and fix the documentation. [YOCTO #15882] (Bitbake rev: 22011765202514600314732b97f1bb938e21f585) Signed-off-by: Robbin Van Damme <robbinvandamme@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
47ff241a84
commit
a2f77bbe0f
@@ -36,6 +36,8 @@ class Az(Wget):
|
||||
|
||||
az_sas = d.getVar('AZ_SAS')
|
||||
if az_sas and az_sas not in ud.url:
|
||||
if not az_sas.startswith('?'):
|
||||
raise FetchError("When using AZ_SAS, it must start with a '?' character to mark the start of the query-parameters.")
|
||||
ud.url += az_sas
|
||||
|
||||
return Wget.checkstatus(self, fetch, ud, d, try_again)
|
||||
@@ -62,6 +64,8 @@ class Az(Wget):
|
||||
az_sas = d.getVar('AZ_SAS')
|
||||
|
||||
if az_sas:
|
||||
if not az_sas.startswith('?'):
|
||||
raise FetchError("When using AZ_SAS, it must start with a '?' character to mark the start of the query-parameters.")
|
||||
azuri = '%s%s%s%s' % ('https://', ud.host, ud.path, az_sas)
|
||||
else:
|
||||
azuri = '%s%s%s' % ('https://', ud.host, ud.path)
|
||||
|
||||
Reference in New Issue
Block a user