summaryrefslogtreecommitdiffstats
path: root/packaging/installer/install-required-packages.sh
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-04-03 20:20:26 +1000
committerGitHub <noreply@github.com>2020-04-03 20:20:26 +1000
commitf1177cc4f678e3ee0fe2e92dc199122d4c8348f2 (patch)
tree272d62df2bf9cb0039a1de62bc0b16264cc5404b /packaging/installer/install-required-packages.sh
parentd0db816d2c3c8f90311154b4a6bcf189b2922f26 (diff)
Ensure we only enable jessie-backports for Debian 8 (jessie) once (#8593)
Diffstat (limited to 'packaging/installer/install-required-packages.sh')
-rwxr-xr-xpackaging/installer/install-required-packages.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh
index 5156ae56dc..ae07e6642f 100755
--- a/packaging/installer/install-required-packages.sh
+++ b/packaging/installer/install-required-packages.sh
@@ -1280,12 +1280,12 @@ install_apt_get() {
echo >&2 "NOTE: Running apt-get update and updating your APT caches ..."
if [ "${version}" = 8 ]; then
echo >&2 "WARNING: You seem to be on Debian 8 (jessie) which is old enough we have to disable Check-Valid-Until checks"
- echo >&2 "We also have to enable the jessie-backports repository"
- if prompt "Is this okay?"; then
- echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" \
- >> /etc/apt/sources.list.d/99-archived.list
+ if ! cat /etc/apt/sources.list /etc/apt/sources.list.d/* 2> /dev/null | grep -q jessie-backports; then
+ echo >&2 "We also have to enable the jessie-backports repository"
+ if prompt "Is this okay?"; then
+ ${sudo} /bin/sh -c 'echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list.d/99-archived.list'
+ fi
fi
- apt-get update -o Acquire::Check-Valid-Until=false
run ${sudo} apt-get "${apt_opts[@]}" -o Acquire::Check-Valid-Until=false update
else
run ${sudo} apt-get "${apt_opts[@]}" update