Thus it looks like a thinko ... the author of the postinst script thought $2 meant something else, or forgot that the postrm script removed the alternatives?
The same test appears to be present in ubuntu 12.04's openjdk-7-jdk_7u51-2.4.4-0ubuntu0.12.04.2_amd64.deb,
but I haven't verified yet whether the problem occurs there as well.
The postinst script for openjdk- 6-jdk_6b27- 1.12.6- 1ubuntu0. 10.04.4_ amd64.deb says:
case "$1" in
update- alternatives --remove-all apt || true
configure)
# obsolete tool
if update-alternatives --list apt 2>/dev/null; then
fi
if [ -z "$2" ]; then
update_ alternatives= y
fi
...
https:/ /www.debian. org/doc/ debian- policy/ ch-maintainersc ripts.html says $2 is " most-recently- configured- version" .
Thus it looks like a thinko ... the author of the postinst script thought $2 meant something else, or forgot that the postrm script removed the alternatives?
The same test appears to be present in ubuntu 12.04's openjdk- 7-jdk_7u51- 2.4.4-0ubuntu0. 12.04.2_ amd64.deb,
but I haven't verified yet whether the problem occurs there as well.