mcst-linux-kernel/patches-2024.06.26/debootstrap-1.0.123/0003-host-suite.patch

44 lines
1.4 KiB
Diff

--- a/debootstrap 2021-09-17 16:39:08.214613814 +0300
+++ b/debootstrap 2021-09-17 17:09:29.718240810 +0300
@@ -129,6 +129,8 @@
--private-key=file read the private key from file
--certificate=file use the client certificate stored in file (PEM)
--no-check-certificate do not check certificate against certificate authorities
+ --host-suite use only with host-base script to set right suite
+ (for example "host6")
EOF
}
@@ -423,6 +425,17 @@
CHECKCERTIF="--no-check-certificate"
shift
;;
+ --host-suite|--host-suite=?*)
+ if [ "$1" = "--host-suite" ] && [ -n "$2" ]; then
+ HOST_SUITE="$2"
+ shift 2
+ elif [ "$1" != "${1#--host-suite=}" ]; then
+ HOST_SUITE="${1#--host-suite=}"
+ shift 1
+ else
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ ;;
-*)
error 1 BADARG "unrecognized or invalid option %s" "$1"
;;
--- a/functions 2021-09-17 17:09:40.890459062 +0300
+++ b/functions 2021-09-17 17:17:54.288094780 +0300
@@ -655,6 +655,11 @@
subpath xzi bz2i gzi normi i ext \
donepkgs pkgdest acquirebyhash
m1="${MIRRORS%% *}"
+
+ if [ "$SUITE" = "host-base" ]; then
+ SUITE="$HOST_SUITE"
+ fi
+
for s in $SUITE $EXTRA_SUITES; do
inreldest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/InRelease")"
reldest="$TARGET/$($DLDEST rel "$s" "$m1" "dists/$s/Release")"