move clean locale to clean container

This commit is contained in:
Tobias Powalowski 2022-02-22 21:35:35 +01:00
parent de3e3cca42
commit f7fe368781
3 changed files with 1 additions and 8 deletions

View file

@ -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}"

View file

@ -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

View file

@ -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)