diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-08-14 01:40:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-14 08:40:58 +0200 |
commit | a14648ffd0bfdb447a5aa7f996afee01454cf5e3 (patch) | |
tree | eddd82fdd06f7ee885e74a5e5f7bfd4e9f625ae6 | |
parent | 8ade93d09dff94265b85252b57b3b11a3e5d2e9b (diff) | |
download | spack-a14648ffd0bfdb447a5aa7f996afee01454cf5e3.tar.gz spack-a14648ffd0bfdb447a5aa7f996afee01454cf5e3.tar.bz2 spack-a14648ffd0bfdb447a5aa7f996afee01454cf5e3.tar.xz spack-a14648ffd0bfdb447a5aa7f996afee01454cf5e3.zip |
external packages: redirect stderr too (#18037)
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) |