From b94711a54ffb86822d77af5c904904b9625f4504 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Sat, 26 Aug 2017 02:30:40 +0200 Subject: Improve Ubuntu arch detection (#2649) Ubuntu uses a YY.{04,10} release scheme, where YY.04 is not necessarily binary-compatible with YY.10. --- lib/spack/spack/operating_systems/linux_distro.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py index 0e97317b1b..276235d18b 100644 --- a/lib/spack/spack/operating_systems/linux_distro.py +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -48,6 +48,11 @@ class LinuxDistro(OperatingSystem): # grab the first legal identifier in the version field. On # debian you get things like 'wheezy/sid'; sid means unstable. # We just record 'wheezy' and don't get quite so detailed. - version = re.split(r'[^\w-]', version)[0] + version = re.split(r'[^\w-]', version) + + if 'ubuntu' in distname: + version = '.'.join(version[0:2]) + else: + version = version[0] super(LinuxDistro, self).__init__(distname, version) -- cgit v1.2.3-70-g09d2