From aea6fc70d18b5b3a9f5e877e32c2861962c7c659 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sun, 19 Feb 2023 09:19:42 +0100 Subject: [PATCH] make_mirror.sh: add ONLY_DEFAULT_DIST and ONLY_HOSTARCH --- make_mirror.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/make_mirror.sh b/make_mirror.sh index 66e5fad..c1417c2 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -417,6 +417,8 @@ security_mirror="http://security.debian.org/debian-security" components=main : "${DEFAULT_DIST:=unstable}" +: "${ONLY_DEFAULT_DIST:=no}" +: "${ONLY_HOSTARCH:=no}" : "${HAVE_QEMU:=yes}" : "${RUN_MA_SAME_TESTS:=yes}" # by default, use the mmdebstrap executable in the current directory @@ -451,6 +453,13 @@ for nativearch in $arches; do if [ "$nativearch" != "$HOSTARCH" ] && [ "$DEFAULT_DIST" != "$dist" ]; then continue fi + # if ONLY_DEFAULT_DIST is set, only download DEFAULT_DIST + if [ "$ONLY_DEFAULT_DIST" = "yes" ] && [ "$DEFAULT_DIST" != "$dist" ]; then + continue + fi + if [ "$ONLY_HOSTARCH" = "yes" ] && [ "$nativearch" != "$HOSTARCH" ]; then + continue + fi # we need a first pass without updates and security patches # because otherwise, old package versions needed by # debootstrap will not get included