mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-06 11:00:13 +02:00
update Java path searches to also match v10, v11, etc.
This is still pretty conversative, since its not easy to test on all those platforms. #474
This commit is contained in:
parent
77f7ca2f25
commit
7eb622930e
@ -160,18 +160,18 @@ def _add_java_paths_to_config(pathlist, thisconfig):
|
|||||||
j = os.path.basename(d)
|
j = os.path.basename(d)
|
||||||
# the last one found will be the canonical one, so order appropriately
|
# the last one found will be the canonical one, so order appropriately
|
||||||
for regex in [
|
for regex in [
|
||||||
r'^1\.([6-9])\.0\.jdk$', # OSX
|
r'^1\.([16-9][0-9]?)\.0\.jdk$', # OSX
|
||||||
r'^jdk1\.([6-9])\.0_[0-9]+.jdk$', # OSX and Oracle tarball
|
r'^jdk1\.([16-9][0-9]?)\.0_[0-9]+.jdk$', # OSX and Oracle tarball
|
||||||
r'^jdk1\.([6-9])\.0_[0-9]+$', # Oracle Windows
|
r'^jdk1\.([16-9][0-9]?)\.0_[0-9]+$', # Oracle Windows
|
||||||
r'^jdk([6-9])-openjdk$', # Arch
|
r'^jdk([16-9][0-9]?)-openjdk$', # Arch
|
||||||
r'^java-([6-9])-openjdk$', # Arch
|
r'^java-([16-9][0-9]?)-openjdk$', # Arch
|
||||||
r'^java-([6-9])-jdk$', # Arch (oracle)
|
r'^java-([16-9][0-9]?)-jdk$', # Arch (oracle)
|
||||||
r'^java-1\.([6-9])\.0-.*$', # RedHat
|
r'^java-1\.([16-9][0-9]?)\.0-.*$', # RedHat
|
||||||
r'^java-([6-9])-oracle$', # Debian WebUpd8
|
r'^java-([16-9][0-9]?)-oracle$', # Debian WebUpd8
|
||||||
r'^jdk-([6-9])-oracle-.*$', # Debian make-jpkg
|
r'^jdk-([16-9][0-9]?)-oracle-.*$', # Debian make-jpkg
|
||||||
r'^java-([6-9])-openjdk-[^c][^o][^m].*$', # Debian
|
r'^java-([16-9][0-9]?)-openjdk-[^c][^o][^m].*$', # Debian
|
||||||
r'^oracle-jdk-bin-1\.([7-9]).*$', # Gentoo (oracle)
|
r'^oracle-jdk-bin-1\.([17-9][0-9]?).*$', # Gentoo (oracle)
|
||||||
r'^icedtea-bin-([7-9]).*$', # Gentoo (openjdk)
|
r'^icedtea-bin-([17-9][0-9]?).*$', # Gentoo (openjdk)
|
||||||
]:
|
]:
|
||||||
m = re.match(regex, j)
|
m = re.match(regex, j)
|
||||||
if not m:
|
if not m:
|
||||||
@ -208,16 +208,16 @@ def fill_config_defaults(thisconfig):
|
|||||||
if thisconfig['java_paths'] is None:
|
if thisconfig['java_paths'] is None:
|
||||||
thisconfig['java_paths'] = dict()
|
thisconfig['java_paths'] = dict()
|
||||||
pathlist = []
|
pathlist = []
|
||||||
pathlist += glob.glob('/usr/lib/jvm/j*[6-9]*')
|
pathlist += glob.glob('/usr/lib/jvm/j*[16-9]*')
|
||||||
pathlist += glob.glob('/usr/java/jdk1.[6-9]*')
|
pathlist += glob.glob('/usr/java/jdk1.[16-9]*')
|
||||||
pathlist += glob.glob('/System/Library/Java/JavaVirtualMachines/1.[6-9].0.jdk')
|
pathlist += glob.glob('/System/Library/Java/JavaVirtualMachines/1.[16-9][0-9]?.0.jdk')
|
||||||
pathlist += glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[6-9]*')
|
pathlist += glob.glob('/Library/Java/JavaVirtualMachines/*jdk*[0-9]*')
|
||||||
pathlist += glob.glob('/opt/oracle-jdk-*1.[7-9]*')
|
pathlist += glob.glob('/opt/oracle-jdk-*1.[0-9]*')
|
||||||
pathlist += glob.glob('/opt/icedtea-*[7-9]*')
|
pathlist += glob.glob('/opt/icedtea-*[0-9]*')
|
||||||
if os.getenv('JAVA_HOME') is not None:
|
if os.getenv('JAVA_HOME') is not None:
|
||||||
pathlist.append(os.getenv('JAVA_HOME'))
|
pathlist.append(os.getenv('JAVA_HOME'))
|
||||||
if os.getenv('PROGRAMFILES') is not None:
|
if os.getenv('PROGRAMFILES') is not None:
|
||||||
pathlist += glob.glob(os.path.join(os.getenv('PROGRAMFILES'), 'Java', 'jdk1.[6-9].*'))
|
pathlist += glob.glob(os.path.join(os.getenv('PROGRAMFILES'), 'Java', 'jdk1.[16-9][0-9]?.*'))
|
||||||
_add_java_paths_to_config(pathlist, thisconfig)
|
_add_java_paths_to_config(pathlist, thisconfig)
|
||||||
|
|
||||||
for java_version in ('7', '8', '9'):
|
for java_version in ('7', '8', '9'):
|
||||||
|
Loading…
Reference in New Issue
Block a user