From f7ea42018086a0a6f005e827f4b9485814e6e60d Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 4 Nov 2019 10:48:36 +0100 Subject: [PATCH] TT#69603 jessie-backports no longer exists, adjust apt sources.list The jessie-backports repository no longer exists, see https://lists.debian.org/debian-devel-announce/2019/03/msg00006.html Our base AMI for jessie (ami-402f1a33, being the most recent available AMI for Debian/jessie) is no longer maintained by Debian and ships a /etc/apt/sources.list.d/backports.list file that breaks apt usage: | $ cat /etc/apt/sources.list.d/backports.list | deb http://cloudfront.debian.net/debian jessie-backports main | deb-src http://cloudfront.debian.net/debian jessie-backports main | [...] | $ sudo apt-get update | W: Failed to fetch http://cloudfront.debian.net/debian/dists/jessie-backports/main/source/Sources 404 Not Found [IP: 99.86.122.86 80] | | W: Failed to fetch http://cloudfront.debian.net/debian/dists/jessie-backports/main/binary-amd64/Packages 404 Not Found [IP: 99.86.122.86 80] | | E: Some index files failed to download. They have been ignored, or old ones used instead. So if file /etc/apt/sources.list.d/backports.list exists and contains "jessie-backports" then remove the file. Change-Id: Idd4b6b376c2e732fa52bd11555ea92971cf52c61 --- ec2-create-ce | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ec2-create-ce b/ec2-create-ce index 71fc5df..6f47497 100755 --- a/ec2-create-ce +++ b/ec2-create-ce @@ -371,6 +371,11 @@ wget -O /tmp/ngcp-installer.deb ${INSTALLER_URL} dpkg -i /tmp/ngcp-installer.deb sed -i 's/cdn-aws.deb.debian.org/deb.debian.org/' /etc/apt/sources.list +if [ -f /etc/apt/sources.list.d/backports.list ] && grep -q 'jessie-backports' /etc/apt/sources.list.d/backports.list ; then + echo "jessie-backports no longer exists, removing /etc/apt/sources.list.d/backports.list" + rm -f /etc/apt/sources.list.d/backports.list +fi + if [ "$SYSTEMD_SUPPORT" = "false" ] && [ -d /run/systemd/system ] ; then echo "Switching from systemd to sysvinit (pre-reboot)" apt update