From 5b98349d15a2db9008bc36d8bebec49701826d51 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Dec 2021 18:08:45 +0100 Subject: Updating. Signed-off-by: Daniel Baumann --- web/update | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/web/update b/web/update index ca5910d..ca9233f 100755 --- a/web/update +++ b/web/update @@ -11,6 +11,7 @@ NORMAL="\033[0m" # FIXME: getopt # FIXME: -f for forced indices download +# FIXME: download downstream binary index and check for architecture-missing-builds MODE="$(basename ${0} | awk -F. '{ print $2 }')" @@ -78,7 +79,7 @@ UPSTREAM_MIRROR="http://debian.ethz.ch/debian" DOWNSTREAM_SECTIONS="main contrib non-free" -ARCHITECTURES="amd64 armel armhf arm64 i386 source" +ARCHITECTURES="amd64 armel armhf arm64 i386 all source" Download_downstream_indices () { @@ -109,6 +110,8 @@ Download_upstream_indices () if [ ! -e "upstream.${MODE}.indices" ] then + echo -n "Downloading indices... " + for DISTRIBUTION in ${UPSTREAM_DISTRIBUTIONS} do case "${DISTRIBUTION}" in @@ -120,7 +123,20 @@ Download_upstream_indices () then for SECTION in ${UPSTREAM_SECTIONS} do - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/source/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + for ARCHITECTURE in ${ARCHITECTURES} + do + echo -n " ." + + case "${ARCHITECTURE}" in + source) + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + + *) + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + esac + done done fi @@ -128,7 +144,20 @@ Download_upstream_indices () then for SECTION in ${UPSTREAM_SECTIONS} do - wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/source/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + for ARCHITECTURE in ${ARCHITECTURES} + do + echo -n "." + + case "${ARCHITECTURE}" in + source) + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + + *) + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}-security/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + esac + done done fi ;; @@ -136,15 +165,36 @@ Download_upstream_indices () for SECTION in ${UPSTREAM_SECTIONS} do - wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/source/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + for ARCHITECTURE in ${ARCHITECTURES} + do + echo -n "." + + case "${ARCHITECTURE}" in + source) + wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/${ARCHITECTURE}/Sources.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + + *) + wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/binary-${ARCHITECTURE}/Packages.xz" | xz -d >> "upstream.${MODE}.indices" + ;; + esac + done done done + + echo " done." fi } Download_downstream_indices Download_upstream_indices + +echo FIXME +exit 1 + + + # Process downstream indices DOWNSTREAM_PACKAGES="$(awk '/^Package: / { print $2 }' downstream.${MODE}.indices | sort -u)" -- cgit v1.2.3