diff --git a/easybuild/easyblocks/p/perl.py b/easybuild/easyblocks/p/perl.py index 3dc5d231bc..88c4eaf291 100644 --- a/easybuild/easyblocks/p/perl.py +++ b/easybuild/easyblocks/p/perl.py @@ -39,7 +39,7 @@ from easybuild.tools.filetools import adjust_permissions from easybuild.tools.environment import setvar, unset_env_vars from easybuild.tools.modules import get_software_root -from easybuild.tools.run import run_cmd +from easybuild.tools.run import run_shell_cmd # perldoc -lm seems to be the safest way to test if a module is available, based on exit code EXTS_FILTER_PERL_MODULES = ("perldoc -lm %(ext_name)s ", "") @@ -116,7 +116,7 @@ def configure_step(self): unset_env_vars(['COLUMNS']) cmd = '%s ./Configure -de %s' % (self.cfg['preconfigopts'], configopts) - run_cmd(cmd, log_all=True, simple=True) + run_shell_cmd(cmd) def test_step(self): """Test Perl build via 'make test'.""" @@ -139,7 +139,7 @@ def test_step(self): # specify locale to be used, to avoid that a handful of tests fail cmd = "export LC_ALL=C && %s" % cmd - run_cmd(cmd, log_all=False, log_ok=False, simple=False) + run_shell_cmd(cmd, fail_on_error=False) def prepare_for_extensions(self): """ @@ -198,8 +198,8 @@ def get_major_perl_version(): Returns the major verson of the perl binary in the current path """ cmd = "perl -MConfig -e 'print $Config::Config{PERL_API_REVISION}'" - (perlmajver, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False) - return perlmajver + res = run_shell_cmd(cmd) + return res.output def get_site_suffix(tag): @@ -212,6 +212,7 @@ def get_site_suffix(tag): """ perl_cmd = 'my $a = $Config::Config{"%s"}; $a =~ s/($Config::Config{"siteprefix"})//; print $a' % tag cmd = "perl -MConfig -e '%s'" % perl_cmd - (sitesuffix, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False) + res = run_shell_cmd(cmd) + sitesuffix = res.output # obtained value usually contains leading '/', so strip it off return sitesuffix.lstrip(os.path.sep)