[2.6.2] improve garuda pacman hook optimization
This commit is contained in:
parent
ecc7514c1e
commit
711f32cfb9
3 changed files with 15 additions and 3 deletions
4
PKGBUILD
4
PKGBUILD
|
@ -2,8 +2,8 @@
|
|||
# Maintainer: Librewish <librewish@gmail.com>
|
||||
|
||||
pkgname=garuda-common-settings
|
||||
pkgver=2.6.1
|
||||
pkgrel=3
|
||||
pkgver=2.6.2
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
||||
license=('GPL')
|
||||
|
|
|
@ -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() {
|
||||
echo "Performing misc postinstall operations..."
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
rm -f /etc/pacman.d/hooks/01-snapshot-reject.hook
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Optimizing pacman hooks
|
|||
|
||||
[Service]
|
||||
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]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in a new issue