I recalled seeing this commit in the log - this bit of code was added to
please piuparts (see bug #454334), and piuparts is still angry? :)

----------
(master)mshuler@mana:~/repos/git/ca-certificates$ git log -1
dfbc841749d7e8d0036d6ac0d6966f4efb8cdaa7
commit dfbc841749d7e8d0036d6ac0d6966f4efb8cdaa7
Author: Philipp Kern <pk...@debian.org>
Date:   Thu Nov 27 18:18:48 2008 +0100

    Remove /etc/ssl{,/certs} in postrm to please piuparts.  (Closes:
#454334)

    piuparts purges openssl first, which leaves `/etc/ssl/certs' on the
    system.  There was already a workaround for #454334 in place, but this
    only covered `/etc/ssl', which was not removable due to `/etc/ssl/certs'
    still in place.

(master)mshuler@mana:~/repos/git/ca-certificates$ git diff
7776067d434b7813470c23207d0185ae056a70be
dfbc841749d7e8d0036d6ac0d6966f4efb8cdaa7
diff --git a/debian/postrm b/debian/postrm
index 260a1c4..e4feb3e 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -28,8 +28,12 @@ case "$1" in

     purge)
        rm -f /etc/ssl/certs/ca-certificates.crt*
-       # Fix for #454334
-       rmdir  --ignore-fail-on-non-empty /etc/ssl
+
+       # Clean up even if openssl is removed before ca-certificates.
+       # (Which is what piuparts does.)
+       [ -d /etc/ssl/certs ] && rmdir --ignore-fail-on-non-empty
/etc/ssl/certs
+       [ -d /etc/ssl ] && rmdir --ignore-fail-on-non-empty /etc/ssl
+
        rm -f /etc/ca-certificates.conf*
        if test -e /usr/share/debconf/confmodule; then
          . /usr/share/debconf/confmodule
(master)mshuler@mana:~/repos/git/ca-certificates$
----------

In looking at #316521, I can understand this might be the problem.  I'll
test out what happens with no explicit rmdir's in postinst and let dpkg
deal with the contents of debian/dirs.

-- 
Kind regards,
Michael Shuler

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to