summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeko-san2022-07-07 02:59:32 -0500
committerNeko-san2022-07-07 02:59:32 -0500
commitac265d8b3d59589af2e55d2b7a7a8149be624aa8 (patch)
tree9778e09de0101d7ef120c11417a11898477848e8
parentcfe361cd2f3a86d7336a4f1dff8beb4058e78cf7 (diff)
downloadaur-ac265d8b3d59589af2e55d2b7a7a8149be624aa8.tar.gz
Added a pacman hook that tries to keep old UE builds from hogging up painful amounts of storage space
-rw-r--r--PKGBUILD3
-rw-r--r--unreal-engine-pacman-cache.hook10
2 files changed, 13 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ae9d04e26958..f99ce38cc9ae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -138,6 +138,9 @@ package() {
fi
install -Dm775 com.unrealengine.UE4Editor.desktop "$pkgdir/usr/share/applications/com.unrealengine.UE4Editor.desktop"
+ ## Install a pacman hook to keep old builds from compounding cache by tens of GBs - 2 builds alone can reach at least 30 GBs in pacman's cache; having one only takes up about 15 GBs
+ install -Dm775 unreal-engine-pacman-cache.hook "${pkgdir}/etc/pacman.d/hooks/unreal-engine-pacman-cache.hook"
+
cd ${pkgname}
# Icon for Desktop entry
diff --git a/unreal-engine-pacman-cache.hook b/unreal-engine-pacman-cache.hook
new file mode 100644
index 000000000000..18517db0e90c
--- /dev/null
+++ b/unreal-engine-pacman-cache.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = unreal-engine-4
+
+[Action]
+Description = Leaving only one Unreal Engine 4 package in cache to save storage space...
+When = PostTransaction
+Exec = /bin/sh -c '/usr/bin/paccache -rvk1 unreal-engine-4'