summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/operating_systems/linux_distro.py7
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)