- log "Checking the public archive copy"
- cd ${mirrordir}/dists
-
- broken=0
- for release in $(find . -name "InRelease"); do
- echo "Processing: ${release}"
- subdir=${release%/InRelease}
- while read SHASUM SIZE NAME; do
- if ! [ -f "${subdir}/${NAME}" ]; then
- bname=$(basename ${NAME})
- if [[ "${bname}" =~ ^(Packages|Sources|Translation-[a-zA-Z_]+)$ ]]; then
- # We don't keep unpacked files, don't check for their existance.
- # We might want to go and check their unpacked shasum, but right now
- # I don't care. I believe it should be enough if all the packed shasums
- # match.
+ log "Checking the public archive copies..."
+
+ local archiveroot mirrordir targetpath
+
+ for archive in "${public_archives[@]}"; do
+ log "... archive: ${archive}"
+ archiveroot="$(get_archiveroot "${archive}")"
+ mirrordir="${archiveroot}/../mirror"
+ targetpath="${mirrordir}/${archive}"
+ cd ${targetpath}/dists
+
+ broken=0
+ for release in $(find . -name "InRelease"); do
+ echo "Processing: ${release}"
+ subdir=${release%/InRelease}
+ while read SHASUM SIZE NAME; do
+ if ! [ -f "${subdir}/${NAME}" ]; then
+ bname=$(basename ${NAME})
+ if [[ "${bname}" =~ ^(Packages|Sources|Contents-[a-zA-Z0-9-]+|Translation-[a-zA-Z_]+|Components-(amd64|i386)\.yml|icons-(128x128|64x64)\.tar)$ ]]; then
+
+ # We don't keep unpacked files, don't check for their existance.
+ # We might want to go and check their unpacked shasum, but right now
+ # I don't care. I believe it should be enough if all the packed shasums
+ # match.
+ continue
+ fi
+ broken=$(( broken + 1 ))
+ echo "File ${subdir}/${NAME} is missing"