[buildd-tools-devel] Bug#608412: Bug#608412: sbuild: purge should probably clean apt-keys

Roger Leigh rleigh at codelibre.net
Thu Dec 30 18:12:23 UTC 2010


tags 608412 + patch
thanks

On Thu, Dec 30, 2010 at 06:52:54PM +0100, Cyril Brulebois wrote:
> purging sbuild leads to some warnings from dpkg, informing that
> /var/lib/sbuild* weren't removed (not empty). apt-keys probably should
> go away on purge.

Agreed.  The other generated files and lockfiles etc. can also be purged.

diff --git a/debian/sbuild.postrm b/debian/sbuild.postrm
index 851aa63..9925886 100755
--- a/debian/sbuild.postrm
+++ b/debian/sbuild.postrm
@@ -67,9 +67,12 @@ case "$1" in
 	rm_conffile "/etc/schroot/setup.d/50sbuild"
 
 	rm -f /var/lib/sbuild/apt.conf
+	rm -f /var/lib/sbuild/apt.conf.*
+	rm -f /var/lib/sbuild/apt-keys/*
 	rm -f /var/lib/sbuild/avg-build-space
 	rm -f /var/lib/sbuild/avg-build-times
 	rm -f /var/lib/sbuild/source-dependencies-*
+	rm -rf /var/lib/sbuild/srcdep-lock
 
         ;;

> (Not sure about files which got added under /etc/sbuild and /etc/schroot
> when sbuild-createchroot is run; but at least at the moment, those files
> are kept on purge.)

sbuild-createchroot creates a single file under /etc/schroot/chroot.d
in addition to the chroot.  This one is a bit more difficult--it's
more like user data than under the control of the package; I'm not
keen on purging this, not least of which because it's not possible
to differentiate it from configurations created manually by the user.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20101230/818ffbf1/attachment.pgp>


More information about the Buildd-tools-devel mailing list