1
0
Fork 0
mirror of synced 2024-11-03 01:39:00 -04:00

[2.6.2] improve garuda pacman hook optimization

This commit is contained in:
TNE 2022-04-25 20:43:42 +02:00
parent ecc7514c1e
commit 711f32cfb9
3 changed files with 15 additions and 3 deletions

View file

@ -2,8 +2,8 @@
# Maintainer: Librewish <librewish@gmail.com> # Maintainer: Librewish <librewish@gmail.com>
pkgname=garuda-common-settings pkgname=garuda-common-settings
pkgver=2.6.1 pkgver=2.6.2
pkgrel=3 pkgrel=1
arch=('any') arch=('any')
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname" url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
license=('GPL') license=('GPL')

View file

@ -10,6 +10,14 @@ post_install() {
} }
pre_upgrade() {
if [[ $(vercmp 2.6.3 $2) -gt 0 ]] && [[ $(vercmp 2.5.8 $2) -lt 0 ]]; then
umount /usr/share/libalpm/hooks/01-snapshot-reject.hook
# Not technically necessary
ln -s /dev/null /etc/pacman.d/hooks/01-snapshot-reject.hook
fi
}
post_upgrade() { post_upgrade() {
echo "Performing misc postinstall operations..." echo "Performing misc postinstall operations..."
mkfontscale /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1 mkfontscale /usr/share/fonts/TTF /usr/share/fonts/OTF /usr/share/fonts/misc > /dev/null 2>&1
@ -24,3 +32,7 @@ post_upgrade() {
systemctl enable garuda-pacman-snapshot-reject systemctl enable garuda-pacman-snapshot-reject
fi fi
} }
post_remove() {
rm -f /etc/pacman.d/hooks/01-snapshot-reject.hook
}

View file

@ -3,7 +3,7 @@ Description=Optimizing pacman hooks
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=bash -c "/usr/lib/garuda/is-snapshot-boot || mount --bind /dev/null /usr/share/libalpm/hooks/01-snapshot-reject.hook" ExecStart=bash -c "if /usr/lib/garuda/is-snapshot-boot; then rm -f /etc/pacman.d/hooks/01-snapshot-reject.hook; else ln -fs /dev/null /etc/pacman.d/hooks/01-snapshot-reject.hook; fi"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target