commit c0c89d5f5164078cc69b4e6cd4c3a4a04ec22614
Author: M. Vefa Bicakci <email address hidden>
Date: Wed Jun 29 20:08:37 2022 +0000
stx: Do not use shell for curl and wget
When using a download URL that includes the character '&' (as part of a
query string), the following build failure is encountered, because the
'&' character was is interpreted by the shell as a special character for
backgrounding the 'wget' command.
This issue is resolved by not using the shell for spawning download
commands. (That is, by setting "shell=False" in Python's
subprocess.Popen constructor.) This commit implements an in-place
solution that detects the type of the argument and sets the "shell="
keyword argument to subprocess.Popen accordingly.
Verification:
- Downloading from URLs with '&' characters works as expected as part of
the "debrepack" phase of build-pkgs.
- No negative behaviour observed with a build from scratch.
Reviewed: https:/ /review. opendev. org/c/starlingx /root/+ /852033 /opendev. org/starlingx/ root/commit/ c0c89d5f5164078 cc69b4e6cd4c3a4 a04ec22614
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit c0c89d5f5164078 cc69b4e6cd4c3a4 a04ec22614
Author: M. Vefa Bicakci <email address hidden>
Date: Wed Jun 29 20:08:37 2022 +0000
stx: Do not use shell for curl and wget
When using a download URL that includes the character '&' (as part of a
query string), the following build failure is encountered, because the
'&' character was is interpreted by the shell as a special character for
backgrounding the 'wget' command.
debrepack - ERROR: 2022-06-29 20:04:31 (3.79 MB/s) - \ a_url_with_ & -O ..." ]
'...' saved [...]
debrepack - ERROR: [ Failed - "wget -t 5 --wait=15 \
http://
This issue is resolved by not using the shell for spawning download Popen constructor.) This commit implements an in-place
commands. (That is, by setting "shell=False" in Python's
subprocess.
solution that detects the type of the argument and sets the "shell="
keyword argument to subprocess.Popen accordingly.
Verification:
- Downloading from URLs with '&' characters works as expected as part of
the "debrepack" phase of build-pkgs.
- No negative behaviour observed with a build from scratch.
Closes-Bug: 1988343 6d139f95d31bcd1 8c51a0fbecb
Change-Id: I2a529f60b9a57b
Signed-off-by: M. Vefa Bicakci <email address hidden>