Hi,
On Fri, 2005-11-11 at 13:00 +0000, Gary Benson wrote:
[...]
That aside, having the database rebuilding as an alternative (so
possibly a no-op) would also cause problems. Imagine this:
1. User has GCJ as their JVM.
2. a) User installs some Fedora packages.
b) GCJ database is rebuilt into a consistent state.
3. User switches to some other JVM.
4. a) User installs some more Fedora packages.
b) GCJ database is not rebuilt.
5. User switches to GCJ as their JVM.
The user has ended up with a broken database. His applications will
be slower, and in some (admittedly broken) cases will suddenly start
to fail.
Right, aot-compile should definitely not be an alternative. The idea is
that "aot-compile --rebuilddb" decides what to do based on three
criteria:
1) a config file, maybe /etc/java/java.conf, specifies the default
behaviour -- to run gcj-dbtool or to be a no-op
2) an environment variable can override this default on a per-run basis
3) if gcj-dbtool is not installed, "aot-compile --rebuilddb" is
automatically a no-op
[...]
> IMPORTANT: please note that aot-compile should not be tied to
GCJ,
> but instead be a characteristic of any Java that is capable of
> pre-compilation.
Sure. This doesn't preclude us from putting the present, GCJ-specific
aot-compile-rpm into the gcc-java rpm, and I still think we should
proceed with this.
Agreed -- aot-compile-rpm is still needed here (and in fact, "aot-
compile" is a confusing name to use in this proposal for a new jpackage-
neutral script).
> In any case, we should try and keep the command names generic so if
> necessary one day the JVMs that are AOT-capable can provide
> alternatives for those.
How about making them even more generic and mandating that all
JPackage rpms call certain scripts at certain points. At the end of
%install, for example, you could require that all packages invoke
jpackage-install, and similarly %post would have jpackage-post and
%postun would have jpackage-postun.
Each script could do both generic JPackage stuff and call specific JVM
stuff. Under your system jpackage-install would call aot-compile-rpm
if GCJ was selected as your JVM, and jpackage-post and -postun would
do the database rebuilding. The scripts could do allsorts: the %prep
script jpackage-prep could check for bundled jars and classes for
example.
This sounds excellent. Perhaps we should post a proposal to the
jpackage list, along with an example of a converted package.
Tom