Bug#289245: java-package: alternatives not removed when sun-j2sdk* is removed
Steven Ihde
Steven Ihde <sihde@cs.stanford.edu>, 289245@bugs.debian.org
Fri Jan 7 17:55:04 2005
Package: java-package
Version: 0.18
Severity: normal
When removing a java package built by make-jpkg (e.g., "apt-get remove
sun-j2sdk1.4"), the alternatives installed by the package are not
removed. Here's what is supposed to happen:
/var/lib/dpkg/info/sun-j2sdk1.4debian.prerm calls
/usr/share/j2sdk1.4-sun/debian/remove, which calls
update-alternatives to actually remove the alternatives.
However, the first thing /usr/share/j2sdk1.4-sun/debian/remove does is
check for existence of /usr/lib/j2sdk1.4-sun/debian/info. This file
is part of sun-j2sdk1.4, not sun-j2sdk1.4debian, and has already been
removed at this point. Thus, no alternatives are ever removed.
While investigating this I noted that sun-j2sdk1.4 and
sun-j2sdk1.4debian each depend on the other. This seems unnecessarily
complicated, and in a way is the cause of the problem: I don't know
how apt-get decides in what order to run the postinst and prerm
scripts given the circular dependency. Apparently (in my case at
least) it picks correctly on the install (sun-j2sdk1.4 is installed
before sun-j2sdk1.4debian, so the install script finds
/usr/lib/j2sdk1.4-sun/debian/info and creates the alternatives), but
picks incorrectly when removing (sun-j2sdk1.4 is removed before
sun-j2sdk1.4debian, so the alternatives are not removed).
I suppose a workaround is to use dpkg to remove these packages
(removing the debian package before the main package), but it would be
nice if this worked with apt-get.
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (900, 'unstable'), (890, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-hamachi
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages java-package depends on:
ii debhelper 4.2.28 helper programs for debian/rules
-- no debconf information