Juan Hernandez has posted comments on this change.
Change subject: packaging: Find and check JVM during setup (#834436)
......................................................................
Patch Set 2:
The engine-setup code that tries to find the JVM tries to locate a symlink that
points to the actual location of the JVM. In Fedora, for example, the result
will be this:
/usr/lib/jvm/jre-1.7.0-openjdk.x86_64
This is a link pointing to the actual location of the JVM:
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.5.x86_64/jre
That symlink is provided by the java-1.7.0-package, and it won't change when
the package is updated (it doesn't contain the micro version).
This works with other distributions as well, for example in Debian the result
will be this:
/usr/lib/jvm/java-1.7.0-openjdk-amd64
That won't change either when the package is updated, as it doesn't include the
micro version.
Doesn't this work in Gentoo?
As far as I understand there is no way to query alternatives for a specific
version, at least not in the flavour of alternatives in Fedora. You can of
course run "alternatives --display java", but then you will need to parse the
names of the directories and decide based on that.
I think that "java-config" is Gentoo only.
What Java program will you suggest to check the java version? Something like
this?
public static void main(String[] args) {
System.out.println(System.getProperty("java.version"));
}
That will print "1.7.0_05-icedtea" and "1.7.0_05" in Gentoo and you will need
still to parse it. Or are you proposing to do like autotools and check for
specific features? That is overkill in my opinion.
--
To view, visit http://gerrit.ovirt.org/7549
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib279ea8111825ec35a25f9ba6ee37b481ed4354f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches