From f7fe368781729226892cca2f2dd7dbb24b489a3e Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 22 Feb 2022 21:35:35 +0100 Subject: [PATCH] move clean locale to clean container --- usr/bin/archboot-aarch64-create-container.sh | 2 -- usr/bin/archboot-x86_64-create-container.sh | 1 - usr/lib/archboot/container_functions | 6 +----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/usr/bin/archboot-aarch64-create-container.sh b/usr/bin/archboot-aarch64-create-container.sh index 36c818d97..cb7357ee4 100755 --- a/usr/bin/archboot-aarch64-create-container.sh +++ b/usr/bin/archboot-aarch64-create-container.sh @@ -17,7 +17,6 @@ if [[ "${_RUNNING_ARCH}" == "aarch64" ]]; then _install_archboot "${1}" || exit 1 _umount_special "${1}" || exit 1 _generate_locales "${1}" || exit 1 - _clean_locale "${1}" _clean_container "${1}" _clean_archboot_cache _generate_keyring "${1}" || exit 1 @@ -33,7 +32,6 @@ if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then _clean_mkinitcpio "${1}" || exit 1 _clean_cache "${1}" || exit 1 _generate_locales "${1}" || exit 1 - _clean_locale "${1}" _clean_container "${1}" 2>/dev/null fi _reproducibility "${1}" diff --git a/usr/bin/archboot-x86_64-create-container.sh b/usr/bin/archboot-x86_64-create-container.sh index 3db54b5d8..e8ef6e1b5 100755 --- a/usr/bin/archboot-x86_64-create-container.sh +++ b/usr/bin/archboot-x86_64-create-container.sh @@ -19,7 +19,6 @@ _clean_cache "${1}" || exit 1 _install_archboot "${1}" || exit 1 _umount_special "${1}" || exit 1 _generate_locales "${1}" || exit 1 -_clean_locale "${1}" _clean_container "${1}" || exit 1 _clean_archboot_cache _generate_keyring "${1}" || exit 1 diff --git a/usr/lib/archboot/container_functions b/usr/lib/archboot/container_functions index 4acaf3d37..2513aac4c 100644 --- a/usr/lib/archboot/container_functions +++ b/usr/lib/archboot/container_functions @@ -52,7 +52,7 @@ _clean_container() { if [[ "${_CLEANUP_CONTAINER}" == "1" ]]; then echo "Clean container, delete not needed files from ${1} ..." rm -r "${1}"/usr/include - rm -r "${1}"/usr/share/{aclocal,applications,audit,avahi,awk,bash-completion,cmake,common-lisp,cracklib,dhclient,dhcpcd,dict,dnsmasq,emacs,et,fish,gdb,gettext,gettext-0.21,glib-2.0,gnupg,graphite2,gtk-doc,iana-etc,icons,icu,iptables,keyutils,libalpm,libgpg-error,makepkg-template,misc,mkinitcpio,ncat,ntp,p11-kit,pixmaps,pkgconfig,readline,screen,smartmontools,ss,stoken,tabset,texinfo,vala,xml,xtables,zoneinfo-leaps,man,doc,info,perl5} + rm -r "${1}"/usr/share/{aclocal,applications,audit,avahi,awk,bash-completion,cmake,common-lisp,cracklib,dhclient,dhcpcd,dict,dnsmasq,emacs,et,fish,gdb,gettext,gettext-0.21,glib-2.0,gnupg,graphite2,gtk-doc,iana-etc,icons,icu,iptables,keyutils,libalpm,libgpg-error,makepkg-template,misc,mkinitcpio,ncat,ntp,p11-kit,pixmaps,pkgconfig,readline,screen,smartmontools,ss,stoken,tabset,texinfo,vala,xml,xtables,zoneinfo-leaps,man,doc,info,perl5,i18n,locale} rm -r "${1}"/usr/lib/{audit,avahi,awk,bash,binfmt.d,cifs-utils,cmake,coreutils,cryptsetup,cups,dracut,e2fsprogs,engines-1.1,environment.d,gawk,getconf,gettext,girepository-1.0,glib-2.0,gnupg,gssproxy,guile,icu,itcl4.2.2,iwd,krb5,ldb,ldscripts,libnl,libproxy,ntfs-3g,openconnect,openssl-1.0,p11-kit,pcsc,perl5,pkcs11,pkgconfig,python3.10,rsync,samba,sasl2,siconv,sysctl.d,sysusers.d,tar,tcl8.6,tcl8,tdbc1.1.3,tdbcmysql1.1.3,tdbcodbc1.1.3,tdbcpostgres1.1.3,terminfo,texinfo,thread2.8.7,valgrind,xfsprogs,xplc-0.3.13,xtables} || return 0 fi } @@ -66,10 +66,6 @@ _clean_mkinitcpio() { [[ -e "${1}/boot/initramfs-linux-fallback.img" ]] && rm "${1}/boot/initramfs-linux-fallback.img" } -_clean_locale() { - [[ "${_SAVE_RAM}" == "1" ]] && (echo "Clean locale from ${1} ..."; rm -r "${1}"/usr/share/{i18n,locale}) -} - _clean_archboot_cache() { # Clean cache on archboot environment grep -qw 'archboot' /etc/hostname && (echo "Cleaning archboot /var/cache/pacman/pkg ..."; rm -r /var/cache/pacman/pkg)