diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2018-11-06 19:56:03 -0800 |
---|---|---|
committer | Greg Becker <becker33@llnl.gov> | 2018-11-06 19:56:03 -0800 |
commit | 058cf81312d07d13b0b6de9949c641892d50ad0b (patch) | |
tree | 44fe1ef6c4c0a3c47235311ab3b6e85c28f46efc | |
parent | 30eda8b837940a884cdad850ff6c6e259d450a16 (diff) | |
download | spack-058cf81312d07d13b0b6de9949c641892d50ad0b.tar.gz spack-058cf81312d07d13b0b6de9949c641892d50ad0b.tar.bz2 spack-058cf81312d07d13b0b6de9949c641892d50ad0b.tar.xz spack-058cf81312d07d13b0b6de9949c641892d50ad0b.zip |
Binary caching: remove symlinks, copy files instead (#9747)
* omit symlinks and create file copies when making a binary cache of a package
* unrelated flake edits involving regexes that recent flake is now angry about
-rw-r--r-- | lib/spack/spack/binary_distribution.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 7df8016f18..71e426346b 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -269,7 +269,9 @@ def build_tarball(spec, outdir, force=False, rel=False, unsigned=False, raise NoOverwriteException(str(specfile_path)) # make a copy of the install directory to work with workdir = os.path.join(tempfile.mkdtemp(), os.path.basename(spec.prefix)) - install_tree(spec.prefix, workdir, symlinks=True) + # set symlinks=False here to avoid broken symlinks when archiving and + # moving the package + install_tree(spec.prefix, workdir, symlinks=False) # create info for later relocation and create tar write_buildinfo_file(spec.prefix, workdir, rel=rel) @@ -586,14 +588,14 @@ def get_keys(install=False, trust=False, force=False): tty.msg("Finding public keys in %s" % mirror) files = os.listdir(mirror) for file in files: - if re.search('\.key', file): + if re.search(r'\.key', file): link = 'file://' + mirror + '/' + file keys.add(link) else: tty.msg("Finding public keys on %s" % url) p, links = spider(url + "/build_cache", depth=1) for link in links: - if re.search("\.key", link): + if re.search(r'\.key', link): keys.add(link) for link in keys: with Stage(link, name="build_cache", keep=True) as stage: |