diff options
5 files changed, 6 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/automake/package.py b/var/spack/repos/builtin/packages/automake/package.py index aa14dc290e..7589712696 100644 --- a/var/spack/repos/builtin/packages/automake/package.py +++ b/var/spack/repos/builtin/packages/automake/package.py @@ -28,7 +28,7 @@ class Automake(AutotoolsPackage, GNUMirrorPackage): @classmethod def determine_version(cls, exe): - output = Executable(exe)('--version', output=str) + output = Executable(exe)('--version', output=str, error=str) match = re.search(r'GNU automake\)\s+(\S+)', output) return match.group(1) if match else None diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index b687f75870..ed8c6b2596 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -162,7 +162,7 @@ class Cmake(Package): @classmethod def determine_version(cls, exe): - output = Executable(exe)('--version', output=str) + output = Executable(exe)('--version', output=str, error=str) match = re.search(r'cmake.*version\s+(\S+)', output) return match.group(1) if match else None diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 60a922c881..185f554b19 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import os import re @@ -35,7 +34,7 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): @classmethod def determine_version(cls, exe): - output = Executable(exe)('--version', output=str, error=os.devnull) + output = Executable(exe)('--version', output=str, error=str) match = re.search(r'\(GNU libtool\)\s+(\S+)', output) return match.group(1) if match else None diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 3bee1ea0a1..0b3632727f 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -80,7 +80,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package @classmethod def determine_version(cls, exe): - output = Executable(exe)('version', output=str) + output = Executable(exe)('version', output=str, error=str) match = re.search(r'OpenSSL.(\S+)*', output) return match.group(1) if match else None diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index a68b97eac6..20c7ee6ee4 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -99,7 +99,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package @classmethod def determine_version(cls, exe): perl = spack.util.executable.Executable(exe) - output = perl('--version', output=str) + output = perl('--version', output=str, error=str) if output: match = re.search(r'perl.*\(v([0-9.]+)\)', output) if match: @@ -110,7 +110,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package def determine_variants(cls, exes, version): for exe in exes: perl = spack.util.executable.Executable(exe) - output = perl('-V', output=str) + output = perl('-V', output=str, error=str) variants = '' if output: match = re.search(r'-Duseshrplib', output) |