Hello community,

here is the log from the commit of package icedtea-web for openSUSE:Factory 
checked in at 2017-12-01 15:53:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/icedtea-web (Old)
 and      /work/SRC/openSUSE:Factory/.icedtea-web.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "icedtea-web"

Fri Dec  1 15:53:53 2017 rev:23 rq:546702 version:1.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/icedtea-web/icedtea-web.changes  2017-11-15 
17:03:50.610755593 +0100
+++ /work/SRC/openSUSE:Factory/.icedtea-web.new/icedtea-web.changes     
2017-12-01 15:54:11.226851769 +0100
@@ -1,0 +2,7 @@
+Thu Nov 23 11:22:54 UTC 2017 - fst...@suse.com
+
+- Modified patch:
+  * icedtea-web-jdk10.patch
+    + more future-proof determination of java version
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ icedtea-web-jdk10.patch ++++++
--- /var/tmp/diff_new_pack.xiMUlX/_old  2017-12-01 15:54:12.006823701 +0100
+++ /var/tmp/diff_new_pack.xiMUlX/_new  2017-12-01 15:54:12.006823701 +0100
@@ -1,46 +1,63 @@
 diff -r 676a6ba5bc31 acinclude.m4
 --- a/acinclude.m4     Mon Sep 25 18:05:33 2017 +0200
-+++ b/acinclude.m4     Tue Nov 14 10:08:22 2017 +0100
-@@ -798,7 +798,7 @@
-   JAVA_VERSION=`$JAVA -version 2>&1`
++++ b/acinclude.m4     Thu Nov 23 11:56:40 2017 +0100
+@@ -795,10 +795,16 @@
+ [
+   AC_REQUIRE([IT_FIND_JAVA])
+   AC_MSG_CHECKING([JDK version])
+-  JAVA_VERSION=`$JAVA -version 2>&1`
++  JAVA_VERSION=`$JAVA -version 2>&1 | head -n 1 | cut -d'-' -f1 | cut -d'"' 
-f2 | cut -d'.' -f1`
++  if test "${JAVA_VERSION}" -eq "1"; then
++    JAVA_VERSION=`$JAVA -version 2>&1 | head -n 1 | cut -d'-' -f1 | cut -d'"' 
-f2 | cut -d'.' -f2`
++  fi
    AC_MSG_RESULT($JAVA_VERSION)
-   HAVE_JAVA8=`if echo $JAVA_VERSION | grep -q -e 1.8.0 ; then echo yes ; fi`
+-  HAVE_JAVA8=`if echo $JAVA_VERSION | grep -q -e 1.8.0 ; then echo yes ; fi`
 -  HAVE_JAVA9=`if echo $JAVA_VERSION | grep -q -e 1.9.0 -e \"9 -e "build 9" ; 
then echo yes ; fi `
-+  HAVE_JAVA9=`if echo $JAVA_VERSION | grep -q -e \"9 -e "build 9" -e \"10 -e 
"build 10" ; then echo yes ; fi `
++  if test "${JAVA_VERSION}" -eq "8"; then
++    HAVE_JAVA8="yes"
++  elif test "$JAVA_VERSION" -ge "9"; then
++    HAVE_JAVA9="yes"
++  fi
    if test -z "$HAVE_JAVA8" -a -z "$HAVE_JAVA9"; then
      AC_MSG_ERROR([JDK8 or newer is required, detected was: $JAVA_VERSION])
    fi
 diff -r 676a6ba5bc31 launcher/launchers.in
 --- a/launcher/launchers.in    Mon Sep 25 18:05:33 2017 +0200
-+++ b/launcher/launchers.in    Tue Nov 14 10:08:22 2017 +0100
-@@ -38,10 +38,14 @@
++++ b/launcher/launchers.in    Thu Nov 23 11:56:40 2017 +0100
+@@ -38,7 +38,11 @@
  fi;
  
  JDK9="NO"
 -if ${JAVA} -version 2>&1 | grep -q "version \"9-" ; then
-+if ${JAVA} -version 2>&1 | grep -q "version \"9" ; then
-+  JDK9="YES"
-+elif ${JAVA} -version 2>&1 | grep -q "version \"10" ; then
++version=`${JAVA} -version 2>&1 | head -n 1 | cut -d'-' -f1 | cut -d'"' -f2 | 
cut -d'.' -f1`
++if [ $version -eq "1" ]; then
++  version=`${JAVA} -version 2>&1 | head -n 1 | cut -d'-' -f1 | cut -d'"' -f2 
| cut -d'.' -f2`
++fi
++if [ $version -ge "9" ]; then
    JDK9="YES"
  fi
  
-+echo "Is JDK9+? $JDK9"
-+
- JAVA_ARGS=( )
- ARGS=( )
- COMMAND=()
 diff -r 676a6ba5bc31 plugin/icedteanp/IcedTeaNPPlugin.cc
 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc      Mon Sep 25 18:05:33 2017 +0200
-+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc      Tue Nov 14 10:08:22 2017 +0100
-@@ -1562,8 +1562,9 @@
++++ b/plugin/icedteanp/IcedTeaNPPlugin.cc      Thu Nov 23 11:56:40 2017 +0100
+@@ -1562,11 +1562,15 @@
    command_line[2] = NULL;
  
    if ( standard_error != NULL ){
 -    if(strstr(standard_error, "\"9") != NULL) {
 -      PLUGIN_DEBUG ("detected 9\n");
-+    if(strstr(standard_error, "\"9") != NULL
-+       || strstr(standard_error, "\"10") != NULL) {
-+      PLUGIN_DEBUG ("detected 9+\n");
-       PLUGIN_DEBUG ("plugin_get_java_version return\n");
-       return 9;
-     }
+-      PLUGIN_DEBUG ("plugin_get_java_version return\n");
+-      return 9;
+-    }
++    int major = 0;
++    int minor = 0;
++    sscanf(standard_error, "%*s %*s \"%d.%d", &major, &minor);
++    if (major == 1)
++      major = minor;
++
++    PLUGIN_DEBUG ("detected version %d\n", major);
++    PLUGIN_DEBUG ("plugin_get_java_version return\n");
++    return major;
+   }
+   PLUGIN_DEBUG ("detected 8 (or generally non nine)\n");
+   PLUGIN_DEBUG ("plugin_get_java_version return\n");


Reply via email to