[PATCH 3/3 F][SRU] UBUNTU: [Packaging] file-downloader not handling positive failures correctly
Alberto Milone
alberto.milone at canonical.com
Fri May 29 14:32:20 UTC 2020
From: Andy Whitcroft <apw at canonical.com>
Seems we are not handling positive failures such as 404 correctly. Add
--fail to get server reported errors converted into errors.
BugLink: https://bugs.launchpad.net/bugs/1878897
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian/scripts/file-downloader | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/scripts/file-downloader b/debian/scripts/file-downloader
index 46ae96237205..0ebfb4de2419 100755
--- a/debian/scripts/file-downloader
+++ b/debian/scripts/file-downloader
@@ -20,7 +20,7 @@ do
echo "II: $what $url"
- curl --silent --show-error "$url" -o "$to" -D "$to.hdr" || exit 1
+ curl --silent --fail --show-error "$url" -o "$to" -D "$to.hdr" || exit 1
redirect=$(awk '/^Location: / {gsub(/^[[:space:]]+|[[:space:]]+$/,"",$2); print $2;}' "$to.hdr")
[ -z "$redirect" ] && break
what=' following'
--
2.25.1
More information about the kernel-team
mailing list