mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
lxc: add -L and -f for curl in templates-use-curl-instead-of-wget.patch
Add support of redirect option -L for curl, the linuxcontainers.org sometimes redirect to other mirror site such like us.lxd.images.canonical.com, this would cause the lxc-download script report download failed. The version of curl in kirkstone also need to add an option -f to use an error code to tell the caller when http/https has errors. Reproduce and verified on following command: lxc-create -t download -n test -- --dist archlinux --release current --arch arm64 Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
a9361e9f81
commit
bfa6727718
|
@ -35,7 +35,7 @@ index a62ddf482..690307338 100755
|
|||
|
||||
download_file() {
|
||||
- if ! wget_wrapper --user-agent="lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -T 30 -q "https://${DOWNLOAD_SERVER}/$1" -O "$2" >/dev/null 2>&1; then
|
||||
+ if ! curl_wrapper --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
|
||||
+ if ! curl_wrapper -L -f --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then
|
||||
if [ "$3" = "noexit" ]; then
|
||||
return 1
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user