summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJustin S <3630356+codeandkey@users.noreply.github.com>2019-12-11 20:20:05 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2019-12-11 20:20:05 -0600
commitc2f45fb4daad1c86606fb13ca35ee973a3ac6198 (patch)
tree63c043a3fc016109cf972d25c35e0e87a6371ff9 /var
parentfec3a852c74febda1c16abe5f5dfe618cbb8c69b (diff)
downloadspack-c2f45fb4daad1c86606fb13ca35ee973a3ac6198.tar.gz
spack-c2f45fb4daad1c86606fb13ca35ee973a3ac6198.tar.bz2
spack-c2f45fb4daad1c86606fb13ca35ee973a3ac6198.tar.xz
spack-c2f45fb4daad1c86606fb13ca35ee973a3ac6198.zip
charmpp: fix build failing from broken hardlink (#13922)
* charmpp: fix build failing from broken hardlink * charmpp: use setup_dependent_build_environment
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/charmpp/package.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/charmpp/package.py b/var/spack/repos/builtin/packages/charmpp/package.py
index c979454e93..6c6f2535cf 100644
--- a/var/spack/repos/builtin/packages/charmpp/package.py
+++ b/var/spack/repos/builtin/packages/charmpp/package.py
@@ -238,6 +238,14 @@ class Charmpp(Package):
pass
shutil.rmtree(join_path(prefix, "tmp"))
+ # A broken 'doc' link in the prefix can break the build.
+ # Remove it and replace it if it is broken.
+ try:
+ os.stat(prefix.doc)
+ except OSError:
+ os.remove(prefix.doc)
+ mkdirp(prefix.doc)
+
@run_after('install')
@on_package_attributes(run_tests=True)
def check_build(self):