Bug#289245: java-package: alternatives not removed when sun-j2sdk* is removed
Steven Ihde
Steven Ihde <sihde@cs.stanford.edu>, 289245@bugs.debian.org
Mon Jan 10 09:54:05 2005
On Sat, 08 Jan 2005 03:54:43 +0100, Jeroen van Wolffelaar wrote:
[...]
> I can see a few reasons why those packages exist at all: a way to get
> depended on and suggested if one tries to fulfil dependencies in sarge,
> and a way users to track whether they are uptodate java-wise. The latter
> isn't being done at the moment, so I'll disregard that. Fir former
> however I can understand: Due to these *debian packages, if one needs a
> 'java2-compiler', apt will come and suggest that the *debian package can
> fulfil that depends, and in turn need a not-yet-created package.
The former is an interesting point, which I hadn't considered.
However we should note that the circular dependency complicates this
process too. If you set up your own private apt repository with the
generated packages and add it to your sources.list it will work OK,
but most people won't do that and instead this is the sequence of
events they must suffer through:
apt-get install [something-depending-on-java2-runtime]
[Hmm, what's this sun-j2sdk1.4debian package maybe I'll try this...]
apt-get install sun-j2sdk1.4debian [FAILS]
[Hmm, that didn't work I guess I need java-package]
apt-get install java-package
[figure out how it works, download sun stuff]
make-jpkg j2sdk...
[sun-j2sdk*.deb packages are created]
dpkg -i sun-j2sdk*.deb [FAILS because it depends on sun-j2sdk*debian]
apt-get install sun-j2sdk1.4debian
[finally it all works -- sun-j2sdk1.4debian can be installed since
sun-j2sdk1.4 is installed but not configured -- after
sun-j2sdk1.4debian is installed, sun-j2sdk1.4 configuration can
complete]
Yes it works, but it's not exactly smooth. OTOH, if
sun-j2sdk1.4debian didn't depend on the sun-j2sdk1.4 package, the
"dpkg -i sun-j2sdk1.4*.deb" would succeed and then when the user
tried, e.g., "apt-get install libjava-whatever" the sun-j2sdk1.4debian
package would be automatically installed without incident. This would
clean up the above process slightly, but how much difference that
would make is a matter of opinion I guess.
>
> Otoh, I see no compelling reason for the *debian packages to be depended
> on by the generated packages... those two scripts (install and remove)
> can just as well be pasted into the generated packages, much
> safer...
I agree, it seems better if the scripts necessary to configure/remove
the package are actually part of the package. Note, however, that
this means sun-j2sdk1.4debian would be completely empty except for
changelog, etc.
>
> I'll need to think this over a bit more, meanwhile, any input welcome on
> what do with this. Just dropping all *debian packages from java-package
> sounds tempting, but otoh, I'm not sure whether it's a good idea.
Either way sounds OK to me, but considering your first point above
it's probably true that without the *debian packages it is much harder
to learn of the existence of this java-package system.
-Steve