The following commit has been merged in the master branch:
commit bfbe6e8416b577d33a0be25359d8a2939f427eed
Author: Eric Cooper <>
Date:   Thu Mar 10 11:33:32 2011 -0500

    Revert "simplify creation of /var/cache/approx in postinst"
    This reverts commit 5195b926dc48236d971c02bc3addc71a143cf5d3.
    The postinst script cannot rely on adduser to create the cache directory.
    When the approx package is purged, the cache directory is removed but
    not the approx user.  If the approx package is reinstalled,
    adduser will exit without creating the cache directory.

diff --git a/debian/approx.postinst b/debian/approx.postinst
index c4bd7b2..c87c234 100644
--- a/debian/approx.postinst
+++ b/debian/approx.postinst
@@ -9,7 +9,13 @@ case "$1" in
 # add the approx user
-adduser --quiet --system --group --home /var/cache/approx approx
+adduser --quiet --system --group --no-create-home --home /var/cache/approx 
+# create the approx cache directory if necessary
+if [ ! -d /var/cache/approx ]; then
+    mkdir /var/cache/approx
+    chown approx:approx /var/cache/approx
 # first remove any "vanilla" entry from /etc/inetd.conf
 update-inetd --remove '^(\d|\w)+\s.*\bapprox\b'

approx upstream and debian packaging

Pkg-ocaml-maint-commits mailing list

Reply via email to