Archive all patches in a package after install (#12653)
When Spack installs a package it writes the package.py file and patches to a separate repository (which reflects the state of the package at the time it was installed). Previously, Spack only wrote patches that were used at installation time. This updates the archiving step to include all patch files that are relevant to the package (in case that repository is used in another context).
This commit is contained in:
parent
0c421589e6
commit
9432d4c7ee
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
import errno
|
||||
import functools
|
||||
import inspect
|
||||
import itertools
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
|
@ -921,7 +922,9 @@ def dump_provenance(self, spec, path):
|
|||
|
||||
# Install patch files needed by the package.
|
||||
mkdirp(path)
|
||||
for patch in spec.patches:
|
||||
for patch in itertools.chain.from_iterable(
|
||||
spec.package.patches.values()):
|
||||
|
||||
if patch.path:
|
||||
if os.path.exists(patch.path):
|
||||
install(patch.path, path)
|
||||
|
|
Loading…
Reference in a new issue