From deadac60f637472781cce3f731cee41839985941 Mon Sep 17 00:00:00 2001 From: KF-Art Date: Wed, 21 Sep 2022 00:35:33 -0400 Subject: [PATCH] Correct REMOVE scripts --- srcpkgs/librewolf-musl/REMOVE | 10 ++++++---- srcpkgs/lpkg/REMOVE | 9 ++++++--- srcpkgs/lpkg/template | 6 +++--- srcpkgs/voidnsrun-setup/REMOVE | 4 +++- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/srcpkgs/librewolf-musl/REMOVE b/srcpkgs/librewolf-musl/REMOVE index d370fd9..bf1e1c6 100644 --- a/srcpkgs/librewolf-musl/REMOVE +++ b/srcpkgs/librewolf-musl/REMOVE @@ -3,10 +3,12 @@ case "$ACTION" in post) - # Enter via chroot to container and remove librewolf-bin - xchroot /glibc xbps-install -Ryfv librewolf-bin + if [ "$UPDATE" = "no" ]; then + # Enter via chroot to container and remove librewolf-bin + xchroot /glibc xbps-install -Ryfv librewolf-bin - # Ensure that xchroot has unmounted all binds - umount -R "/glibc/dev" "/glibc/etc/resolv.conf" "/glibc/proc" "/glibc/sys" + # Ensure that xchroot has unmounted all binds + umount -R "/glibc/dev" "/glibc/etc/resolv.conf" "/glibc/proc" "/glibc/sys" + fi ;; esac diff --git a/srcpkgs/lpkg/REMOVE b/srcpkgs/lpkg/REMOVE index 68e440b..5c2f0f9 100644 --- a/srcpkgs/lpkg/REMOVE +++ b/srcpkgs/lpkg/REMOVE @@ -6,9 +6,12 @@ pre) # # Remove all installed LPKG packages to avoid conflicts # - for pkg in $(lpkg -i | cut -d "-" -f1 | tail -n +3); - do lpkg remove ${pkg} - done + + if [ "$UPDATE" = "no" ]; then + for pkg in $(lpkg -i | cut -d "-" -f1 | tail -n +3); + do lpkg remove ${pkg} + done + fi ;; post) diff --git a/srcpkgs/lpkg/template b/srcpkgs/lpkg/template index 2210fe1..5ac2d39 100644 --- a/srcpkgs/lpkg/template +++ b/srcpkgs/lpkg/template @@ -1,7 +1,7 @@ # Template file for 'lpkg' pkgname=lpkg version=10.1 -revision=2 +revision=3 archs="x86_64 i686" build_style=fetch hostmakedepends="bsdtar wget" @@ -44,8 +44,8 @@ do_install() { elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then _repo="loc-os_linux/lpkg-list32" - # Currently the LPKG GUI is built only for x86_64. In future releases this won't be necessary. - rm ${DESTDIR}/opt/Loc-OS-LPKG/LpkgGui + # Currently the LPKG GUI is built only for x86_64. In future releases this won't be necessary. + rm ${DESTDIR}/opt/Loc-OS-LPKG/LpkgGui fi # Fetch repository list diff --git a/srcpkgs/voidnsrun-setup/REMOVE b/srcpkgs/voidnsrun-setup/REMOVE index 698ae68..0f3c83f 100644 --- a/srcpkgs/voidnsrun-setup/REMOVE +++ b/srcpkgs/voidnsrun-setup/REMOVE @@ -1,6 +1,8 @@ # REMOVE case "$ACTION" in pre) - rm -r /glibc + if [ "$UPDATE" = "no" ]; then + rm -r /glibc + fi ;; esac