diff options
author | Christian Goll <cgoll@suse.de> | 2022-06-20 22:20:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-20 22:20:31 +0200 |
commit | 0fe57962b3b34d0ec3de0de282f841b5f0a77c8d (patch) | |
tree | c8e7e221f5facde79a557e3ec6cb1e46322a8fa2 /lib/spack | |
parent | 8ec451aa7db5e51acd48f4401d57f381ba6a1496 (diff) | |
download | spack-0fe57962b3b34d0ec3de0de282f841b5f0a77c8d.tar.gz spack-0fe57962b3b34d0ec3de0de282f841b5f0a77c8d.tar.bz2 spack-0fe57962b3b34d0ec3de0de282f841b5f0a77c8d.tar.xz spack-0fe57962b3b34d0ec3de0de282f841b5f0a77c8d.zip |
OpenSUSE Tumbleweed: use GLIBC version as distro version (#19895)
Tumbleweed is a rolling release that would have used a date
as a version instead.
Diffstat (limited to 'lib/spack')
-rw-r--r-- | lib/spack/spack/operating_systems/linux_distro.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/operating_systems/linux_distro.py b/lib/spack/spack/operating_systems/linux_distro.py index a1721d0623..70ea6a22b5 100644 --- a/lib/spack/spack/operating_systems/linux_distro.py +++ b/lib/spack/spack/operating_systems/linux_distro.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import platform as py_platform import re +from subprocess import check_output from spack.version import Version @@ -51,6 +52,17 @@ class LinuxDistro(OperatingSystem): if 'ubuntu' in distname: version = '.'.join(version[0:2]) + # openSUSE Tumbleweed is a rolling release which can change + # more than once in a week, so set version to tumbleweed$GLIBVERS + elif 'opensuse-tumbleweed' in distname or 'opensusetumbleweed' in distname: + distname = 'opensuse' + output = check_output(["ldd", "--version"]).decode() + libcvers = re.findall(r'ldd \(GNU libc\) (.*)', output) + if len(libcvers) == 1: + version = 'tumbleweed' + libcvers[0] + else: + version = 'tumbleweed' + version[0] + else: version = version[0] |