From 05db886e27428ddf47627884f56494f3d3b4b8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 2 Nov 2022 16:41:12 +0100 Subject: [PATCH] osbuilder: Remove non-needed packages at the end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of removing the non-needed packages under `/usr/share` and then installing new components, let's make sure we do the removal at the end of our script. Signed-off-by: Fabiano FidĂȘncio --- tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh index aedceb1bce..9eb118fe49 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh +++ b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh @@ -30,9 +30,6 @@ EOF cp --remove-destination "$file" "$rootfs_dir$file" done - # Reduce image size and memory footprint by removing unnecessary files and directories. - rm -rf $rootfs_dir/usr/share/{bash-completion,bug,doc,info,lintian,locale,man,menu,misc,pixmaps,terminfo,zsh} - if [ "${AA_KBC}" == "eaa_kbc" ] && [ "${ARCH}" == "x86_64" ]; then source /etc/os-release @@ -52,4 +49,7 @@ EOF echo "rats-tls-tdx is only provided for Ubuntu 20.04, there's yet no packages for Ubuntu ${VERSION_ID}" fi fi + + # Reduce image size and memory footprint by removing unnecessary files and directories. + rm -rf $rootfs_dir/usr/share/{bash-completion,bug,doc,info,lintian,locale,man,menu,misc,pixmaps,terminfo,zsh} }