From 753c604b77f008b3d0556a42e9c9a4fe45657e12 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 6 Feb 2023 13:00:45 +0100 Subject: [PATCH] clean pacman db from not existent packages --- CHANGELOG | 3 ++- usr/lib/archboot/common.sh | 2 +- usr/lib/archboot/login.sh | 34 +++++++++++++++++++++------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 34d771da1..82bff07ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,7 +8,8 @@ Environment changes: - show full initrd line in grub menu - added fbset and terminus-font - switch to Terminus as default font -- removed pcre, zsh, grml-zsh-config, chntpw, fsarchiver and ddrescue +- removed refind, grub, pcre, zsh, grml-zsh-config, chntpw, fsarchiver + and ddrescue - switch to bash as default shell - added normal bash layout with /root/.bash* files - custom bash options are provided by /etc/profile.d/custom-bash-options.sh diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index 21651cd56..232fe236e 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -20,7 +20,7 @@ fi _PACMAN_MIRROR="/etc/pacman.d/mirrorlist" _PACMAN_CONF="/etc/pacman.conf" _CACHEDIR="/var/cache/pacman/pkg" -_FIX_PACKAGES="libelf libevent talloc gdbm gcc-libs glibc glib2 nss p11-kit libp11-kit tpm2-tss libsecret libcap libbsd libldap libmd jansson libsasl pcre2 gettext icu libxml2" +_FIX_PACKAGES="libelf libevent talloc gdbm gcc-libs glibc glib2 nss p11-kit libp11-kit tpm2-tss libsecret libcap libbsd libldap libmd jansson libsasl pcre2" _XORG_PACKAGE="xorg" _VNC_PACKAGE="tigervnc" _WAYLAND_PACKAGE="egl-wayland" diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 52fe54b1e..8192394ab 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -3,18 +3,7 @@ # created by Tobias Powalowski # don't run ttyS0 as first device _vconsole() { - if ! [[ -e "/.vconsole-run" ]]; then - touch /.vconsole-run - FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '*fb0/modes')" | sed -e 's#.*:##g')" - if [[ "${FB_SIZE}" -gt '1900' ]]; then - SIZE="32" - else - SIZE="16" - fi - echo KEYMAP=us > /etc/vconsole.conf - echo FONT=ter-v${SIZE}n >> /etc/vconsole.conf - systemctl restart systemd-vconsole-setup - fi + } _welcome () { @@ -84,7 +73,26 @@ _run_update_installer() { fi } -_vconsole +if ! [[ -e "/.vconsole-run" ]]; then + touch /.vconsole-run + FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '*fb0/modes')" | sed -e 's#.*:##g')" + if [[ "${FB_SIZE}" -gt '1900' ]]; then + SIZE="32" + else + SIZE="16" + fi + echo KEYMAP=us > /etc/vconsole.conf + echo FONT=ter-v${SIZE}n >> /etc/vconsole.conf + systemctl restart systemd-vconsole-setup +fi +if ! [[ -e "/.clean-pacman-db" ]]; then + touch /.clean-pacman-db + _RM_PACMAN_DB="grub libxml2 icu gettext refind" + for i in ${_RM_PACMAN_DB}; do + rm -rf /var/lib/pacman/local/{i}* &>/dev/null + done +fi + if [[ -e /usr/bin/setup ]]; then _local_mode _enter_shell