downloader fails to follow redirects
A redirect is used to aid in the transition from
mirror.starlingx.cengn.ca to mirror.starlingx.windriver.com.
Curl does not support redirects, unless the -L/--location options are
specified.
Partial-Bug: 2028678
Change-Id: I7ea1c163e3301d16a2c651e0c32964738ac37a3c
Signed-off-by: Scott Little <scott.little@windriver.com>
(cherry picked from commit bd9ced2479
)
This commit is contained in:
parent
af136024e7
commit
d1e7027a7f
|
@ -249,11 +249,11 @@ class DebDownloader(BaseDownloader):
|
|||
(dl_url, alt_dl_url) = utils.get_download_url(url, CENGN_STRATEGY)
|
||||
if alt_dl_url:
|
||||
try:
|
||||
utils.run_shell_cmd(["curl", "-k", "-f", dl_url, "-o", tmp_file], logger)
|
||||
utils.run_shell_cmd(["curl", "-k", "-L", "-f", dl_url, "-o", tmp_file], logger)
|
||||
except:
|
||||
utils.run_shell_cmd(["curl", "-k", "-f", alt_dl_url, "-o", tmp_file], logger)
|
||||
utils.run_shell_cmd(["curl", "-k", "-L", "-f", alt_dl_url, "-o", tmp_file], logger)
|
||||
else:
|
||||
utils.run_shell_cmd(["curl", "-k", "-f", dl_url, "-o", tmp_file], logger)
|
||||
utils.run_shell_cmd(["curl", "-k", "-L", "-f", dl_url, "-o", tmp_file], logger)
|
||||
utils.run_shell_cmd(["mv", tmp_file, ret], logger)
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in New Issue