(In reply to comment #0)
> You need to call java-pkg-2_pkg_setup in pkg_setup or you will not get VM
> switching etc when the hooks are removed.
Why did you modify 5.5.x and not 6.0.x? Please do not make any changes if you
are only going to modify one, and leave the problem in others to be address
later on.
29 Apr 2007; Petteri Räty <betelgeuse@gentoo.org>
tomcat-5.5.23-r1.ebuild:
RDEPEND on dev-java/ant-core and call java-pkg-2_pkg_setup in pkg_setup.
Had you filed a bug about it then, I would have addressed both at once. Instead
of one at a time. Guess this way is more efficient.
> Also because you require >=1.5 please add the same version check to the init
> script in 6* as was already added to 5.5.
I fail to see how that is necessary. It seems to me that type of logic should
be in the build system or etc. java-config or etc should know if a package was
built with a given version. If a person tries to drop the vm below the min
version a package or packages were compiled against. The user get's an error.
Maybe info telling them which packages won't work with the vm they selected.
Otherwise we will have to address this on a one on one basis across the board.
Which can be done with applications via launchers and init scripts. But can't
be done for libraries. So again it's a band aid on a bigger problem.
I did it to 5.5 since 5.5 can be compiled as 1.4 or 1.5 bytecode due to java5
flag. So people might do dumb stuff like set java5 and leave their system vm as
1.4 or etc. With Tomcat 6, that is not possible. Not to mention Tomcat 6.x only
compiles to 1.5 bytecode. Since 1.6 is in ~arch and 1.5 is stable. I fail to
see how this could ever be a problem.
Not to mention upstream clearly states Tomcat 6.x is meant to be run with >=1.5
jdk. So if someone is trying to run it on Gentoo with 1.4, or does by accident.
They are doing really dumb stuff, and I would rather spend my time adding
features for intelligent users. Than fail safes for people doing dumb stuff, or
not paying attention to their env.
(In reply to comment #1)
>
> Why did you modify 5.5.x and not 6.0.x? Please do not make any changes if you
> are only going to modify one, and leave the problem in others to be address
> later on.
>
Yes I should have done both. Mistakes happen. I was fixing stuff as found by
emerge-everything-java but I had 6* already installed so didn't bump into this
one at that time.
>
> I fail to see how that is necessary. It seems to me that type of logic should
> be in the build system or etc. java-config or etc should know if a package was
> built with a given version. If a person tries to drop the vm below the min
> version a package or packages were compiled against. The user get's an error.
> Maybe info telling them which packages won't work with the vm they selected.
>
Maybe it would be prudent to add a bash file in java-config that you can source
in the init script and does takes care of showing the error if needed. That way
all our server init scripts could make use of it. I opened bug 179755 for it.