Backport update_popcon fix

This commit is contained in:
Steve McIntyre 2020-08-01 12:53:03 +01:00
parent 6ae3a2fa6a
commit 1821cbbe35
2 changed files with 7 additions and 5 deletions

2
debian/changelog vendored
View File

@ -21,6 +21,8 @@ debian-cd (3.1.21-stretch) UNRELEASED; urgency=medium
jigdo files, to reduce load on the service.
+ Fix up ordering in imagesums
+ Add a "with firmware" text to the DISKINFO string when appropriate
+ tools/update_popcon: cope with lower-case HTTP headers too; Debian
just enabled http2 so this broke
-- Steve McIntyre <93sam@debian.org> Mon, 19 Jun 2017 13:39:58 +0100

View File

@ -36,7 +36,7 @@ dl_file () {
# We've had problems in the past with download failures causing issues,
# so let's make sure that we get the complete file in each case
DIST=$1
SITE="http://popcon.debian.org/"
SITE="https://popcon.debian.org/"
curl -L $capath -s --head $SITE/$DIST/by_inst > $TDIR/$DIST.head
error=$?
@ -45,7 +45,7 @@ dl_file () {
exit 1
fi
HEAD_SIZE=`cat $TDIR/$DIST.head | \
awk '/^Content-Length/ {gsub("\r","");print $2}'`
awk '/^.ontent-.ength/ {gsub("\r","");print $2}'`
curl -L $capath -s $SITE/$DIST/by_inst > $TDIR/$DIST
error=$?
@ -55,14 +55,14 @@ dl_file () {
exit 1
fi
if [ $DL_SIZE != $HEAD_SIZE ] ; then
if [ "$DL_SIZE"x != "$HEAD_SIZE"x ] ; then
echo "Failed to download correctly: expected $HEAD_SIZE bytes, but got $DL_SIZE bytes" >&2
exit 1
fi
LASTMOD=`awk '/^Last-Modified:/ {
LASTMOD=`awk '/^.ast-.odified:/ {
gsub("\r","")
gsub("^Last-Modified: ","")
gsub("^.ast-.odified: ","")
print $0}' $TDIR/$DIST.head`
echo "$LASTMOD"
}