c0c89d5f51
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) - \ '...' saved [...] debrepack - ERROR: [ Failed - "wget -t 5 --wait=15 \ http://a_url_with_& -O ..." ] 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. Closes-Bug: 1988343 Change-Id: I2a529f60b9a57b6d139f95d31bcd18c51a0fbecb Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>