1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 08:32:42 +00:00

Fix jessie apt archive (#724)

This commit is contained in:
Michele Locati 2023-04-11 18:40:29 +02:00 committed by GitHub
parent 1bbb7c4944
commit 3d99a6c40d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -3898,9 +3898,21 @@ invokeAptGetUpdate() {
fi
IPE_APTGET_INSTALLOPTIONS=''
if ! grep -q 'VERSION="8 (jessie)"' /etc/os-release; then
IPE_APTGETUPDATE_ALREADY=y
DEBIAN_FRONTEND=noninteractive apt-get update -q
return
fi
# See https://www.debian.org/distrib/archive.en.html for a list of mirrors
if test -z "${IPE_DEB_ARCHIVE:-}"; then
IPE_DEB_ARCHIVE=http://archive.kernel.org/debian-archive
fi
if test -z "${IPE_DEB_ARCHIVE_SECURITY:-}"; then
IPE_DEB_ARCHIVE_SECURITY=http://archive.kernel.org/debian-archive/debian-security
fi
sed -ri "s;^(\s*deb\s+http://(httpredir|deb).debian.org/debian\s+jessie-updates\b.*);#\1;" /etc/apt/sources.list
sed -ri "s;^(\s*deb\s+)http://(httpredir|deb).debian.org;\1$IPE_DEB_ARCHIVE;" /etc/apt/sources.list
sed -ri "s;^(\s*deb\s+)http://security.debian.org/debian-security;\1$IPE_DEB_ARCHIVE_SECURITY;" /etc/apt/sources.list
sed -ri "s;^(\s*deb\s+)http://security.debian.org;\1$IPE_DEB_ARCHIVE_SECURITY;" /etc/apt/sources.list
invokeAptGetUpdate_tmp="$(mktemp)"
DEBIAN_FRONTEND=noninteractive apt-get update -q 2>"$invokeAptGetUpdate_tmp"
if test -s "$invokeAptGetUpdate_tmp"; then