From 0e7d2620224575f7eb3ec5a2b4dae18ef8d18651 Mon Sep 17 00:00:00 2001 From: Jonas Scharpf Date: Tue, 14 Jan 2025 15:26:35 +0100 Subject: [PATCH] Remove outdated g++-13.list file from sources list directory ... as the existance might block the installation via apt CMK-21056 Change-Id: I3c2b0d416e2f69f77a5f1b85ad7ae1cc40a76778 --- .../build-nodes/scripts/install-development.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/buildscripts/infrastructure/build-nodes/scripts/install-development.sh b/buildscripts/infrastructure/build-nodes/scripts/install-development.sh index 2bfe3a3d822..f52f205b406 100755 --- a/buildscripts/infrastructure/build-nodes/scripts/install-development.sh +++ b/buildscripts/infrastructure/build-nodes/scripts/install-development.sh @@ -180,6 +180,7 @@ prepare_gplusplus_sources_list() { if [[ -z ${CI} ]]; then outdated_gcc_directory="/opt/gcc-13.2.0" + outdated_sources_list_file="/etc/apt/sources.list.d/g++-13.list" # confirm removal of outdated /opt/gcc-13.2.0 directory read -rp "Confirm removal of outdated symlinks from '$outdated_gcc_directory' to '/usr/bin' (y/n): " REMOVE_SYMLINKS echo # (optional) move to a new line @@ -203,6 +204,15 @@ prepare_gplusplus_sources_list() { # https://tribe29.slack.com/archives/C01EA6ZBG58/p1736439443305919?thread_ts=1736251952.199259&cid=C01EA6ZBG58 print_red "Existing symlinks might block new ones, created by PPA installed packages, leading to missing 'ar', 'as', 'ld', 'gcc', ... " fi + + if [[ -e "$outdated_sources_list_file" ]]; then + print_blue "Found outdated '$outdated_sources_list_file' file. Installation of g++ with 'apt-get' in the next step will be incomplete or fail if not removed" + read -rp "Confirm removal of outdated file '$outdated_sources_list_file' (y/n): " REMOVE_OUTDATED_GCC_LIST_FILE + if [[ $REMOVE_OUTDATED_GCC_LIST_FILE =~ ^[Yy]$ ]]; then + rm "$outdated_sources_list_file" + fi + fi + print_debug "It is no CI build, install software-properties-common" # https://tribe29.slack.com/archives/C01EA6ZBG58/p1736251952199259