From a5315f3878ed55ed5e373f51905da865085c756b Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 10 Apr 2019 08:44:27 -0500 Subject: [PATCH] Fix bug when system perl is used. (#11034) * Fix bug when system perl is used. If system perl is being used through packages.yaml there cannot be dependent modules. The setup_dependent_packages function should not do anything in that case. --- .../repos/builtin/packages/perl/package.py | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 51cfc8869b7..1825832644c 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -190,15 +190,19 @@ def setup_dependent_package(self, module, dependent_spec): perl('Makefile.PL','INSTALL_BASE=%s' % self.prefix) """ - # perl extension builds can have a global perl executable function - module.perl = self.spec['perl'].command - - # Add variables for library directory - module.perl_lib_dir = dependent_spec.prefix.lib.perl5 - - # Make the site packages directory for extensions, - # if it does not exist already. + # If system perl is used through packages.yaml + # there cannot be extensions. if dependent_spec.package.is_extension: + + # perl extension builds can have a global perl + # executable function + module.perl = self.spec['perl'].command + + # Add variables for library directory + module.perl_lib_dir = dependent_spec.prefix.lib.perl5 + + # Make the site packages directory for extensions, + # if it does not exist already. mkdirp(module.perl_lib_dir) @run_after('install')