We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 95dc8a51 authored by Karl Goetz's avatar Karl Goetz

If we are downloading bz2 files, why not use apt-cachers?

This code path checks for a local copy of the dist we want in
apt-cachers directory and will copy the dists into place if it finds
them. It checks for each dist we want, so an incomplete apt-cacher
shouldn't cause the script to abort.
parent 57148d78
......@@ -26,13 +26,21 @@ set -ex
# For each of the dists we target, download the packages files.
for dist in '' -security $EXTRAS; do
wget -q -c -m -np -nH --cut-dirs=3 -A "Packages.bz2" -A "Sources.bz2" -P$WORKINGDIR/dists-download \
# If we have apt-cacher-ng in use, use its dists (site specific code
# path, I know ...)
if [ -d /var/cache/apt-cacher-ng/*/ubuntu/dists/$MIRRORDIST$dist ]; then
# Sync the dists files into place.
rsync -a /var/cache/apt-cacher-ng/*/ubuntu/dists/$MIRRORDIST$dist $MIRRORLOCAL/dists/
# If we don't have apt-cacher, download the lists from a mirror.
wget -q -c -m -np -nH --cut-dirs=3 -A "Packages.bz2" \
-A "Sources.bz2" -P$WORKINGDIR/dists-download \
# Sync the dists files into place.
rsync -a $WORKINGDIR/dists-download $MIRRORLOCAL/dists/
# Sync the dists files into place.
rsync -a $WORKINGDIR/dists-download/* $MIRRORLOCAL/dists/
# Extract the lists so awk can handle them
find $MIRRORLOCAL/dists/ -name Packages.bz2 -exec bunzip2 -f {} \;
find $MIRRORLOCAL/dists/ -name Sources.bz2 -exec bunzip2 -f {} \;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment