Package: mercurial-server
Version: 1.0.1-1.1
Severity: serious

Your postrm does:

        if remove_repositories_on_purge; then
            echo -n "Removing hg user and purging data..."
            deluser --remove-home --quiet --system hg > /dev/null || true
        else
            echo -n "Removing hg user..."
            deluser --quiet --system hg > /dev/null || true
        fi
        delgroup --quiet --system hg > /dev/null || true
        echo done

If !remove_repositories_on_purge, this leaves files on the system with
no owner.  Just don't remove the user (and group) in that case.  In
combination with your postinst, which does:

        if ! getent passwd hg >/dev/null; then
            adduser --disabled-password --quiet --system \
                --shell /bin/sh --group \
                --home /var/lib/mercurial-server \
                --gecos "Mercurial repositories" hg
            su -c "/usr/share/mercurial-server/init/hginit 
/usr/share/mercurial-server" hg

this means that an install/purge/install cycle fails on the second
install with:
abort: repository . already exists!
because /var/lib/mercurial-server is kept from the first install so the
second hginit breaks.

Cheers,
Julien

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (101, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Attachment: signature.asc
Description: Digital signature

Reply via email to