]> the.earth.li Git - onak.git/commitdiff
Cleanup database files on package purge (Closes: #1053323)
authorJonathan McDowell <noodles@earth.li>
Tue, 15 Jul 2025 09:22:43 +0000 (10:22 +0100)
committerJonathan McDowell <noodles@earth.li>
Tue, 15 Jul 2025 09:22:43 +0000 (10:22 +0100)
We're creating the database as part of package install, which then means
we can't remove /var/lib/onak on package purge. Delete the created
database files so we cleanup fully.

debian/changelog
debian/postrm

index 7e5f6f2c7c471b07ea539eb4406907048cad8f12..c07aa0c6631a9249e9289ce16ce119ed1b329869 100644 (file)
@@ -1,3 +1,10 @@
+onak (0.6.3-1+git) UNRELEASED; urgency=low
+
+  * Development snapshot
+  * Cleanup database files on package purge (Closes: #1053323)
+
+ -- Jonathan McDowell <noodles@earth.li>  Tue, 15 Jul 2025 10:21:10 +0100
+
 onak (0.6.3-1) unstable; urgency=low
 
   * New upstream release
index d5384f95776693c4447147a8754668a0cc6b4172..d9cb69a38ed1778d48001721593c21e28c167015 100644 (file)
@@ -10,6 +10,11 @@ if [ "$1" = "purge" ]; then
     fi
 
     rm -f /var/log/onak.log /var/log/onak.log.1 /var/log/onak.log.*.gz
+
+    # Clean up any key databases, if they exist
+    if [ -d /var/lib/onak -a ! -z "$(ls -A /var/lib/onak)" ]; then
+        rm -f /var/lib/onak/*
+    fi
 fi
 
 #DEBHELPER#