subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcor...@apache.org
Subject svn commit: r1841524 - /subversion/trunk/build/generator/gen_win_dependencies.py
Date Fri, 21 Sep 2018 00:48:24 GMT
Author: jcorvel
Date: Fri Sep 21 00:48:23 2018
New Revision: 1841524

URL: http://svn.apache.org/viewvc?rev=1841524&view=rev
Log:
Fix detection of JDK 10 on Windows when --with-jdk is used.

* build/generator/gen_win_dependencies.py
  (_find_jdk): Use javac.exe instead of javah.exe for validating the
   --with-jdk option. Drop the quotes from the vermatch regex, because
   with javac the version number is not quoted.

Modified:
    subversion/trunk/build/generator/gen_win_dependencies.py

Modified: subversion/trunk/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/generator/gen_win_dependencies.py?rev=1841524&r1=1841523&r2=1841524&view=diff
==============================================================================
--- subversion/trunk/build/generator/gen_win_dependencies.py (original)
+++ subversion/trunk/build/generator/gen_win_dependencies.py Fri Sep 21 00:48:23 2018
@@ -1067,11 +1067,15 @@ class GenDependenciesBase(gen_base.Gener
       return
 
     try:
-      outfp = subprocess.Popen([os.path.join(jdk_path, 'bin', 'javah.exe'),
-                               '-version'], stdout=subprocess.PIPE).stdout
+	  # Apparently a 1.8 javac writes its version output to stderr, while
+	  # a 1.10 javac writes it to stdout. To catch them all, we redirect
+	  # stderr to stdout.
+      outfp = subprocess.Popen([os.path.join(jdk_path, 'bin', 'javac.exe'),
+                               '-version'], stdout=subprocess.PIPE,
+                               stderr=subprocess.STDOUT).stdout
       line = outfp.read()
       if line:
-        vermatch = re.search(r'"(([0-9]+(\.[0-9]+)+)(_[._0-9]+)?)"', line, re.M)
+        vermatch = re.search(r'(([0-9]+(\.[0-9]+)+)(_[._0-9]+)?)', line, re.M)
       else:
         vermatch = None
 



Mime
View raw message