diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/az.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/az.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/az.py b/bitbake/lib/bb/fetch2/az.py index 3ccc594c22..1d3664f213 100644 --- a/bitbake/lib/bb/fetch2/az.py +++ b/bitbake/lib/bb/fetch2/az.py | |||
@@ -36,6 +36,8 @@ class Az(Wget): | |||
36 | 36 | ||
37 | az_sas = d.getVar('AZ_SAS') | 37 | az_sas = d.getVar('AZ_SAS') |
38 | if az_sas and az_sas not in ud.url: | 38 | if az_sas and az_sas not in ud.url: |
39 | if not az_sas.startswith('?'): | ||
40 | raise FetchError("When using AZ_SAS, it must start with a '?' character to mark the start of the query-parameters.") | ||
39 | ud.url += az_sas | 41 | ud.url += az_sas |
40 | 42 | ||
41 | return Wget.checkstatus(self, fetch, ud, d, try_again) | 43 | return Wget.checkstatus(self, fetch, ud, d, try_again) |
@@ -62,15 +64,18 @@ class Az(Wget): | |||
62 | az_sas = d.getVar('AZ_SAS') | 64 | az_sas = d.getVar('AZ_SAS') |
63 | 65 | ||
64 | if az_sas: | 66 | if az_sas: |
67 | if not az_sas.startswith('?'): | ||
68 | raise FetchError("When using AZ_SAS, it must start with a '?' character to mark the start of the query-parameters.") | ||
65 | azuri = '%s%s%s%s' % ('https://', ud.host, ud.path, az_sas) | 69 | azuri = '%s%s%s%s' % ('https://', ud.host, ud.path, az_sas) |
66 | else: | 70 | else: |
67 | azuri = '%s%s%s' % ('https://', ud.host, ud.path) | 71 | azuri = '%s%s%s' % ('https://', ud.host, ud.path) |
68 | 72 | ||
73 | dldir = d.getVar("DL_DIR") | ||
69 | if os.path.exists(ud.localpath): | 74 | if os.path.exists(ud.localpath): |
70 | # file exists, but we didnt complete it.. trying again. | 75 | # file exists, but we didnt complete it.. trying again. |
71 | fetchcmd += d.expand(" -c -P ${DL_DIR} '%s'" % azuri) | 76 | fetchcmd += " -c -P %s '%s'" % (dldir, azuri) |
72 | else: | 77 | else: |
73 | fetchcmd += d.expand(" -P ${DL_DIR} '%s'" % azuri) | 78 | fetchcmd += " -P %s '%s'" % (dldir, azuri) |
74 | 79 | ||
75 | try: | 80 | try: |
76 | self._runwget(ud, d, fetchcmd, False) | 81 | self._runwget(ud, d, fetchcmd, False) |