charmpp: fix build failing from broken hardlink (#13922)

* charmpp: fix build failing from broken hardlink

* charmpp: use setup_dependent_build_environment
This commit is contained in:
Justin S 2019-12-11 20:20:05 -06:00 committed by Adam J. Stewart
parent fec3a852c7
commit c2f45fb4da

View file

@ -238,6 +238,14 @@ def install(self, spec, prefix):
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):