Tweak ordering of snapshot URLs

Put snapshot.d.o last in the list in jigdo files, to reduce load on
the service.

Backported from current HEAD
This commit is contained in:
Steve McIntyre 2019-05-14 14:30:47 +01:00
parent 44b8e77b6b
commit 88d34912fa
2 changed files with 11 additions and 9 deletions

2
debian/changelog vendored
View File

@ -17,6 +17,8 @@ debian-cd (3.1.21-stretch) UNRELEASED; urgency=medium
- Generate checksums for torrents and jigdo files too if desired
- Tweak the code ordering in update-cd so the jigdo file checksums
are generated after they're compressed.
- Tweak ordering of snapshot URLs - put snapshot.d.o last in the list in
jigdo files, to reduce load on the service.
-- Steve McIntyre <93sam@debian.org> Mon, 19 Jun 2017 13:39:58 +0100

View File

@ -40,24 +40,24 @@ cat $jigdo | awk -v ISO="$iso" -v TEMPLATE="$template" -v DISCINFO="$discinfo" -
' > $jigdo.1
mv -f $jigdo.1 $jigdo
# Snapshot URL
if [ "$snapurl"x != ""x ] ; then
echo "$snapurl" >> $jigdo
fi
# If some fallbacks were specified, output a servers section with the
# URLs. The entries of the variable are expected to be already of the
# form "Label=http://some.url/"
if test -n "$JIGDOFALLBACKURLS"; then
for url in "$JIGDOFALLBACKURLS"
do
# The --try-last switch assigns a lower priority to the URL,
# so it will only be used if other server entries (without the
# --try-last) have already been tried without success.
echo "$url --try-last" >> $jigdo
echo "$url" >> $jigdo
done
fi
# Snapshot URL - use last
if [ "$snapurl"x != ""x ] ; then
# The --try-last switch assigns a lower priority to the URL,
# so it will only be used if other server entries (without the
# --try-last) have already been tried without success.
echo "$snapurl --try-last" >> $jigdo
fi
# Create a snapshot tree if we've been told where to create one
if test -n "$JIGDOFALLBACKPATH"; then
echo "Creating snapshot tree:"