diff options
author | Jon Rood <jon.rood@nrel.gov> | 2018-07-22 15:51:59 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-07-22 16:51:59 -0500 |
commit | 777a0fe5df4682a7f04b0c63e5cb7697ed4055f8 (patch) | |
tree | 37c12946e0ba5154ed0d39158c7b37da6c683fdb /var | |
parent | c9147aad80d89e6659265d18ffeaf41fea18daef (diff) | |
download | spack-777a0fe5df4682a7f04b0c63e5cb7697ed4055f8.tar.gz spack-777a0fe5df4682a7f04b0c63e5cb7697ed4055f8.tar.bz2 spack-777a0fe5df4682a7f04b0c63e5cb7697ed4055f8.tar.xz spack-777a0fe5df4682a7f04b0c63e5cb7697ed4055f8.zip |
Make read only source file writeable in perl before patch to avoid failures on lustre filesystem. (#8764)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/perl/package.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 3e40c68349..ef69a88ad3 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -102,6 +102,18 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package phases = ['configure', 'build', 'install'] + # On a lustre filesystem, patch may fail when files + # aren't writeable so make pp.c user writeable + # before patching. This should probably walk the + # source and make everything writeable in the future. + def do_stage(self, mirror_only=False): + # Do Spack's regular stage + super(Perl, self).do_stage(mirror_only) + # Add write permissions on file to be patched + filename = join_path(self.stage.source_path, 'pp.c') + perm = os.stat(filename).st_mode + os.chmod(filename, perm | 0o200) + def configure_args(self): spec = self.spec prefix = self.prefix |