← Back to team overview

openjdk team mailing list archive

Bug#643755: openjdk-7-jre-headless: binfmt deregistration on package removal broken

 

Package: openjdk-7-jre-headless
Version: 7~b147-2.0~pre6-1
Severity: normal

I removed openjdk-6 some time ago, and just got the following on
an upgrade of openjdk-7:

<--  snip  -->

....
Setting up openjdk-7-doc (7~b147-2.0~pre6-1) ...
Setting up openjdk-7-jre-headless (7~b147-2.0~pre6-1) ...
Installing new version of config file /etc/java-7-openjdk/security/java.security ...
update-binfmts: warning: current package is openjdk-7, but binary format already installed by openjdk-6
Setting up openjdk-7-jre-lib (7~b147-2.0~pre6-1) ...
....

<--  snip  -->


The problem boils down to the following code in the prerm of
openjdk-{6,7}-jre-headless:

<--  snip  -->

....
    if which update-binfmts >/dev/null; then
        # try to remove and ignore the error
        if [ -e /var/lib/binfmts/openjdk-7 ]; then
            update-binfmts --package openjdk-7 \
                --remove jar /usr/bin/jexec || true
        fi
    fi
....

<--  snip  -->


There is no /var/lib/binfmts/openjdk-{6,7}, instead there is a
/var/lib/binfmts/jar .


And I wonder why there are not (anymore?) version specific files:

A common sequence when installing a new Java version is to first
install the new version (so that dependencies are always fulfilled)
and then remove the obsolete old version.

If I understand that correctly, this leaves users without binfmt
registration?

And when this happens during an upgrade from oldstable to stable,
the binfmt registration might not happen until the upgrade to the
next stable release (or a DSA for OpenJDK).


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)