| Summary: | php-sapi.eclass incoreclty check java version | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | R.a E <raer> |
| Component: | [OLD] Development | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | blocker | CC: | raer |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
R.a E
2004-06-15 11:09:29 UTC
This problem is related to following lines from the "/usr/portage/eclass/php-sapi.eclass"
--8<--
JDKVER="$(java-config --java-version 2>&1 | head -n1 | cut -d\" -f2)"
--8<--
And to following warning message produced by java
SUN JDK
--8<--
>/opt/sun-jdk-1.4.2.04/bin/java -version
WARNING: Default charset KOI8-U not supported, using ISO-8859-1 instead
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
[root@knur:~]
--8<--
BLACKDOWN ORG JDK
--8<--
>/opt/blackdown-jdk-1.4.1/bin/java -version
WARNING: Default charset KOI8-U not supported, using ISO-8859-1 instead
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.1-01)
Java HotSpot(TM) Client VM (build Blackdown-1.4.1-01, mixed mode)
[root@knur:~]
--8<--
The code from /usr/portage/eclass/php-sapi.eclass take first line of java output and succesfully fail to recognize any version... :(
This situation can be fixed by changing code in the /usr/portage/eclass/php-sapi.eclass
--8<--
>diff -u /usr/portage/eclass/php-sapi.eclass /usr/portage/eclass/php-sapi.eclass.WORK
--- /usr/portage/eclass/php-sapi.eclass 2004-06-15 20:56:44.242691952 +0300
+++ /usr/portage/eclass/php-sapi.eclass.WORK 2004-06-15 20:40:08.635047320 +0300
@@ -217,7 +217,7 @@
die
fi
- JDKVER="$(java-config --java-version 2>&1 | head -n1 | cut -d\" -f2)"
+ JDKVER="$(java-config --java-version 2>&1 | grep "java version" | head -n1 | cut -d\" -f2)"
einfo "Active JDK version: ${JDKVER}"
case ${JDKVER} in
1.4.*) ;;
[root@knur:~]
--8<--
|