move db cleaning from login to base_common

This commit is contained in:
Tobias Powalowski 2023-08-31 22:37:32 +02:00
parent 7313bdbf37
commit d829a48561
2 changed files with 9 additions and 15 deletions

View file

@ -131,17 +131,6 @@ if ! [[ -e /.vconsole-run ]]; then
echo FONT=ter-v${SIZE}n >>/etc/vconsole.conf echo FONT=ter-v${SIZE}n >>/etc/vconsole.conf
systemctl restart systemd-vconsole-setup systemctl restart systemd-vconsole-setup
fi fi
if ! [[ -e /.clean-pacman-db ]]; then
: > /.clean-pacman-db
_RM_PACMAN_DB="base grub libxml2 icu gettext refind amd-ucode intel-ucode edk2-shell \
libisoburn libburn libisofs mkinitcpio memtest linux-api-headers jansson libwbclient \
libbsd libmd libpcap libnftnl libnfnetlink libnetfilter_conntrack libsasl libldap memtest86+ \
memtest86+-efi mkinitcpio-busybox mtools libsysprof-capture libnsl libksba gdbm binutils \
cdrtools systemd-ukify python python-pefile limine man-pages libev libpipeline groff db db5.3"
for i in ${_RM_PACMAN_DB}; do
rm -rf /var/lib/pacman/local/"${i}"-[0-9]* &>"${_NO_LOG}"
done
fi
if [[ "${TTY}" = "tty1" ]] ; then if [[ "${TTY}" = "tty1" ]] ; then
if ! mount | grep -q zram0; then if ! mount | grep -q zram0; then

View file

@ -196,12 +196,17 @@ build ()
add_file "/usr/share/archboot/base/etc/systemd/system/pacman-init.service" "/etc/systemd/system/pacman-init.service" add_file "/usr/share/archboot/base/etc/systemd/system/pacman-init.service" "/etc/systemd/system/pacman-init.service"
map add_full_dir "/usr/share/pacman/keyrings" "/usr/share/makepkg" map add_full_dir "/usr/share/pacman/keyrings" "/usr/share/makepkg"
# add local installed pacman database in container mode # add local installed pacman database in container mode
if [[ -e "/etc/hostname" ]]; then if [[ "$(cat /etc/hostname )" == "archboot" ]]; then
[[ "$(cat /etc/hostname )" == "archboot" ]] && add_full_dir "/var/lib/pacman/local"
else
add_full_dir "/var/lib/pacman/local" add_full_dir "/var/lib/pacman/local"
_RM_PACMAN_DB="base grub libxml2 icu gettext refind amd-ucode intel-ucode edk2-shell \
libisoburn libburn libisofs mkinitcpio memtest linux-api-headers jansson libwbclient \
libbsd libmd libpcap libnftnl libnfnetlink libnetfilter_conntrack libsasl libldap memtest86+ \
memtest86+-efi mkinitcpio-busybox mtools libsysprof-capture libnsl libksba gdbm binutils \
cdrtools systemd-ukify python python-pefile limine man-pages libev libpipeline groff db db5.3"
for i in ${_RM_PACMAN_DB}; do
rm -rf ${BUILDROOT}/var/lib/pacman/local/"${i}"-[0-9]* &>"${_NO_LOG}"
done
fi fi
### add nss p11-kit and ca certificates ### add nss p11-kit and ca certificates
map add_binary p11-kit trust certutil cmsutil crlutil modutil nss-config pk12util \ map add_binary p11-kit trust certutil cmsutil crlutil modutil nss-config pk12util \
shlibsign signtool signver ssltap symkeyutil update-ca-trust shlibsign signtool signver ssltap symkeyutil update-ca-trust