better uninstalled checks

This commit is contained in:
Tobias Powalowski 2023-09-04 21:16:53 +02:00
parent 88a94f96ff
commit a495d61a63
2 changed files with 5 additions and 4 deletions

View file

@ -3,14 +3,14 @@
# created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh
_archboot_check
rm -r /usr/share/licenses
rm -r /usr/share/{licenses,locale}
pacman -Sy
pacman -Q | cut -d ' ' -f1 >packages.txt
#shellcheck disable=SC2013
for i in $(cat packages.txt); do
rm -r /var/lib/pacman/local/"${i}"*
#shellcheck disable=SC2086
if pacman -S ${i} --noconfirm &>>log.txt; then
if pacman -Sdd ${i} --noconfirm 2>&1 >>log.txt; then
echo "${i}" >> uninstalled.orig.txt
else
#shellcheck disable=SC2086

View file

@ -71,7 +71,7 @@ build ()
# remove conflicting files from not installed packages: binutils, grub and gdbm
find "${BUILDROOT}/usr/share/locale/" -type f \( -name 'grub*' -o -name 'binutils*' -o -name 'gdbm*' -o -name 'bfd*' \
-o -name 'gettext*' -o -name 'gas*' -o -name 'gold*' -o -name 'gprof*' -o -name 'ld*' \
-o -name 'opcodes*' \) -delete
-o -name 'man-db*' -o -name 'opcodes*' -o -name 'texinfo*' \) -delete
fi
### add bash configuration
@ -202,7 +202,8 @@ build ()
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"
cdrtools systemd-ukify python python-pefile limine man-pages libev libpipeline groff \
man-db texinfo db db5.3"
for i in ${_RM_PACMAN_DB}; do
rm -rf "${BUILDROOT}"/var/lib/pacman/local/"${i}"-[0-9]* &>"${_NO_LOG}"
done