[Pkg-libvirt-commits] [libvirt] 02/04: Clean up capabilities and possibly empty dirs

Guido Guenther agx at moszumanska.debian.org
Thu Sep 25 17:44:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/1.2.8-3
in repository libvirt.

commit a32e72eedb1921d90a92bef3f0156f5a97fb7bcd
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Sep 24 19:47:01 2014 +0200

    Clean up capabilities and possibly empty dirs
    
    Closes: #761131
---
 debian/libvirt-daemon-system.postrm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/debian/libvirt-daemon-system.postrm b/debian/libvirt-daemon-system.postrm
index c675fd7..2499c8a 100644
--- a/debian/libvirt-daemon-system.postrm
+++ b/debian/libvirt-daemon-system.postrm
@@ -33,7 +33,18 @@ case "$1" in
     		delgroup libvirt-qemu || true
 	fi
 
-	rm -rf /var/log/libvirt
+	# Clean up logs and cached capabilities
+	rm -rf /var/log/libvirt \
+	       /var/cache/libvirt/qemu/capabilities
+
+	# Clean up created dirs if emtpy, they contain
+	# precious data otherwise
+	rmdir --ignore-fail-on-non-empty   \
+	    /var/lib/libvirt/qemu/save     \
+	    /var/lib/libvirt/qemu/snapshot \
+	    /var/lib/libvirt/qemu/dump     \
+	    /var/lib/libvirt/qemu          \
+	    /var/cache/libvirt/qemu
     ;;
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
     ;;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git



More information about the Pkg-libvirt-commits mailing list