ignore expired releases for apt installs

This commit is contained in:
Lance Vick 2023-02-28 10:33:59 -08:00
parent 216cd15fe0
commit 27e0da8773
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 11 additions and 3 deletions

View File

@ -5,10 +5,16 @@ ARCH=$(uname -m)
cp /config/toolchain/* /etc/apt/ cp /config/toolchain/* /etc/apt/
apt-get update apt-get update -o Acquire::Check-Valid-Until=false
apt-get install debian-archive-keyring apt-get install debian-archive-keyring
until apt-get install --download-only --reinstall --allow-downgrades -y $(cat /etc/apt/packages-${ARCH}.list); do until apt-get install \
--download-only \
--reinstall \
--allow-downgrades \
-o Acquire::Check-Valid-Until=false \
-y $(cat /etc/apt/packages-${ARCH}.list);
do
echo "apt install failed. Likely throttled. Retrying in 10 mins..."; echo "apt install failed. Likely throttled. Retrying in 10 mins...";
sleep 600; sleep 600;
done; done;
@ -22,5 +28,7 @@ done;
diff /etc/apt/package-hashes-${ARCH}{,-compare}.txt diff /etc/apt/package-hashes-${ARCH}{,-compare}.txt
apt-get install --allow-downgrades -y $(cat /etc/apt/packages-${ARCH}.list) apt-get install \
--allow-downgrades \
-y $(cat /etc/apt/packages-${ARCH}.list)
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*; rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*;