Adjust kernel detection to support Solaris 5.10 or earlier

The logic previously added to distinguish between illumos and Solaris made use of a uname invocation with a -o switch which is not supported on Solaris 5.10 or earlier.
illumos started with version 5.11 so the logic has been shortcut to report 'solaris' in such cases where the version is 5.10 or below.
pull/12289/head
CorrodedCoder 1 year ago committed by Dylan Baker
parent d5546bdcea
commit 5b16e830cc
  1. 5
      mesonbuild/environment.py

@ -411,6 +411,11 @@ KERNEL_MAPPINGS: T.Mapping[str, str] = {'freebsd': 'freebsd',
def detect_kernel(system: str) -> T.Optional[str]:
if system == 'sunos':
# Solaris 5.10 uname doesn't support the -o switch, and illumos started
# with version 5.11 so shortcut the logic to report 'solaris' in such
# cases where the version is 5.10 or below.
if mesonlib.version_compare(platform.uname().release, '<=5.10'):
return 'solaris'
# This needs to be /usr/bin/uname because gnu-uname could be installed and
# won't provide the necessary information
p, out, _ = Popen_safe(['/usr/bin/uname', '-o'])

Loading…
Cancel
Save