diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2017-08-26 02:30:40 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-08-25 17:30:40 -0700 |
commit | b94711a54ffb86822d77af5c904904b9625f4504 (patch) | |
tree | 54788f5836d3fb58a0f63aa4e87cb24a50b88a54 /lib | |
parent | c769e99eda84921c3cfa9bb95e60bfc20eb655da (diff) | |
download | spack-b94711a54ffb86822d77af5c904904b9625f4504.tar.gz spack-b94711a54ffb86822d77af5c904904b9625f4504.tar.bz2 spack-b94711a54ffb86822d77af5c904904b9625f4504.tar.xz spack-b94711a54ffb86822d77af5c904904b9625f4504.zip |
Improve Ubuntu arch detection (#2649)
Ubuntu uses a YY.{04,10} release scheme, where YY.04 is not necessarily
binary-compatible with YY.10.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/operating_systems/linux_distro.py | 7 |
1 files changed, 6 insertions, 1 deletions
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) |