From 714b7a8bab224b7b00960a84765cd9b19c0cce1a Mon Sep 17 00:00:00 2001 From: Salvador Orozco Villalever Date: Mon, 23 Aug 2021 23:38:45 +0000 Subject: [PATCH] Remove unnecessary glibc-devel and its dependencies --- scripts/install_external.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/install_external.sh b/scripts/install_external.sh index ab09e15..3ac99f4 100644 --- a/scripts/install_external.sh +++ b/scripts/install_external.sh @@ -140,15 +140,20 @@ function performPreInstallationTasksForExternalBuild() function installPackages() { if [ "$PLATFORM_NAME" == "$RHEL8" ]; then - ACCEPT_EULA=Y dnf -q -y --disableplugin=subscription-manager install \ - $(getListOfPackagesToInstall) - - elif [ "$PLATFORM_NAME" == "$RHEL7" ]; then - ACCEPT_EULA=Y yum -y --nogpgcheck install \ + ACCEPT_EULA=Y dnf -q -y -v --disableplugin=subscription-manager install \ $(getListOfPackagesToInstall) fi } +# Function that removes packages from the container image +# which are not actually needed. +# +function removeUnnecessaryPackages() +{ + dnf remove -y -v \ + glibc-devel +} + # Function that performs post-installation tasks # common across build environments. # @@ -181,6 +186,8 @@ function performCommonPostInstallationTasks # Remove files from /tmp. # rm -rf /tmp/* + + removeUnnecessaryPackages } # Function that drives the installation of packages -- GitLab