diff options
author | Xiangyu Chen <xiangyu.chen@windriver.com> | 2023-03-17 17:48:35 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2023-03-17 15:38:36 -0400 |
commit | 4d248c7383512368d11cdab2f2b358b03abd9f73 (patch) | |
tree | ef9d89d86504561019e8dae22d8b11977dce2ee1 /recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch | |
parent | 4be39209be25e5bad2686f2511d0b4ff5c30603b (diff) | |
download | meta-virtualization-4d248c7383512368d11cdab2f2b358b03abd9f73.tar.gz |
lxc: add -L option for curl in templates-use-curl-instead-of-wget.patch
Add support of redirect option 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.
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>
Diffstat (limited to 'recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch')
-rw-r--r-- | recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch index ff5c5f65..e9af8335 100644 --- a/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch +++ b/recipes-containers/lxc/files/templates-use-curl-instead-of-wget.patch | |||
@@ -35,7 +35,7 @@ index a62ddf482..690307338 100755 | |||
35 | 35 | ||
36 | download_file() { | 36 | download_file() { |
37 | - 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 | 37 | - 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 |
38 | + 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 | 38 | + if ! curl_wrapper -L --user-agent "lxc/@PACKAGE_VERSION@ compat:${DOWNLOAD_COMPAT_LEVEL}" -m 30 -s "https://${DOWNLOAD_SERVER}/$1" -o "$2" >/dev/null 2>&1; then |
39 | if [ "$3" = "noexit" ]; then | 39 | if [ "$3" = "noexit" ]; then |
40 | return 1 | 40 | return 1 |
41 | else | 41 | else |