Bug#656552: zope2.12-sandbox: fails to upgrade from testing

Ivo De Decker ivo.dedecker at ugent.be
Wed Nov 21 21:14:43 UTC 2012


Hi,

On Sat, Jun 16, 2012 at 02:24:56PM +0200, Andreas Beckmann wrote:
> the problem now also happens on a regular update from testing.

[...]

> Installing dialog does not help.
> You should ask a debconf guru as that seems to be a debconf
> related problem, /usr/share/debconf/frontend seems to be failing.

This is not a debconf problem.

Here is what happens:

* first install

The postinst creates a zope instance:
       if dzhandle -z $ZVER make-instance -u "$user:$password" $INSTANCE \
            --addon-mode=all --restart=end -t tree-linked \
            --service-port=$port --service-user=zope:zope  $ZEOSERVER

This creates a directory /var/lib/zope2.12/instance/sandbox/ with a number of
files.

* remove package

The directory /var/lib/zope2.12/instance/sandbox/ is still there (with files).

* second install

/var/lib/dpkg/info/zope2.12-sandbox.config runs. It checks if there is an instance without datafs:
    if [ -d /var/lib/zope$ZVER/instance/$INSTANCE ] && \
         [ "$DATABASE" != "ZEO" ] && \
         [ ! -f /var/lib/zope$ZVER/instance/$INSTANCE/var/Data.fs ]; then
        FIRST_STATE=1
    else
        FIRST_STATE=2
    fi

This is the case, so FIRST_STATE=1

In this case, the script checks what to do, by asking the user:
                db_get $PKG/remove-instance-without-data

This template defaults to abort:
	Template: zope-common/remove-instance-without-data
	Type: select
	Choices: abort, remove and continue
	Default: abort

So this script aborts (by exiting with return code 10).


In other words: the package creates an (empty) zope instance in the postinst,
but fails to install if such an instance exists. This makes a reinstall fail.


It seems the relevant parts of these scripts come from zope-debhelper, so this
bug probably originates there.


Cheers,

Ivo



More information about the pkg-zope-developers mailing list