summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAndrew W Elble <aweits@rit.edu>2022-01-05 13:22:43 -0500
committerGitHub <noreply@github.com>2022-01-05 10:22:43 -0800
commita4f0fbafbb7e60fb056e1bea8de924c9c2286e61 (patch)
tree35e67e99994d8c4cacf2d8faef5fe451fc38b619 /var
parent52cfd179177412ec772c820dc5e345d17cb83bd1 (diff)
downloadspack-a4f0fbafbb7e60fb056e1bea8de924c9c2286e61.tar.gz
spack-a4f0fbafbb7e60fb056e1bea8de924c9c2286e61.tar.bz2
spack-a4f0fbafbb7e60fb056e1bea8de924c9c2286e61.tar.xz
spack-a4f0fbafbb7e60fb056e1bea8de924c9c2286e61.zip
Add function to determine Linux kernel version (#27855)
This reports the kernel version (vs. the distro version) on Linux and returns a valid Version (stripping characters like '+' which may be present for custom-built kernels).
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index e79a72c842..47339df1f8 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -10,10 +10,11 @@ import sys
import llnl.util.tty as tty
from spack import *
+from spack.operating_systems.linux_distro import kernel_version
from spack.operating_systems.mac_os import macos_version
MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
-LINUX_VERSION = Version(platform.release()) if platform.system() == 'Linux' else None
+LINUX_VERSION = kernel_version() if platform.system() == 'Linux' else None
class Qt(Package):