diff --git a/etc/archboot/defaults b/etc/archboot/defaults index c4c21f129..f606f0fdb 100644 --- a/etc/archboot/defaults +++ b/etc/archboot/defaults @@ -6,13 +6,11 @@ _GRUB_CONFIG="/usr/share/archboot/grub/archboot-main-grub.cfg" _GRUB_BACKGROUND="/usr/share/archboot/grub/archboot-background.png" ### XFCE defaults # needed full installed packages in environment for X -_FULL_PACKAGES="llvm-libs gcc-libs perl glibc libtiff glib2 libcups harfbuzz avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb libmd jansson libsasl" +_FULL_PACKAGES="gcc-libs perl glibc libtiff glib2 libcups harfbuzz avahi nss p11-kit libp11-kit fuse tpm2-tss libsecret smbclient libcap tevent libbsd libldap tdb ldb libmd jansson libsasl" # ignore packages to upgrade before X startup eg. kernel and firmware _X_IGNORE="linux linux-firmware linux-firmware-marvell" # X packages _X_PACKAGES="xorg chromium xfce4 tigervnc breeze-icons gvfs gvfs-smb thunar-archive-plugin thunar-volman file-roller gparted gnome-keyring nss-mdns mousepad ristretto" -# packages to remove from cache before X startup happens -_X_RM_PACKAGES="xorg xfce4 chromium llvm-libs mesa ffmpeg" # don't show in xfce menu _HIDE_MENU="xfce4-mail-reader xfce4-about" # VNC password diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index a5e99fc46..72e63cf7e 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -237,6 +237,19 @@ _cleanup_install() { rm -rf /usr/lib/libgo.* } +_cleanup_x_cache() { + # get last full package + LAST_FULL_PACKAGE="$(grep 'FULL' /etc/archboot/defaults | sed -e 's#^.*\ ##g' -e 's#\"##g')" + # installed packages + grep installed /var/log/pacman.log | cut -d ' ' -f 4 >/tmp/installed.log + # remove all lines above with match + sed "1,/^${LAST_FULL_PACKAGE}$/d" >/tmp/installed.log + # remove packages from cache + for i in $(cat /tmp/installed.log); do + rm -rf /var/cache/pacman/pkg/${i}-* + done +} + _prepare_xfce() { # fix libs first, then install packages from defaults _XORG="${_FULL_PACKAGES} ${_X_PACKAGES}" @@ -272,10 +285,8 @@ _prepare_xfce() { fi echo "Removing not used icons ..." rm -rf /usr/share/icons/breeze-dark - echo "Removing files from cache directory: ${_X_RM_PACKAGES} ..." - for i in ${_X_RM_PACKAGES}; do - rm -f /var/cache/pacman/pkg/"${i}"-* - done + echo "Removing files from cache directory ..." + _cleanup_x_cache echo "Removing firmware files ..." rm -rf /usr/lib/firmware echo "Recreating C.UTF-8 locale ..."