summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Gartung <gartung@fnal.gov>2020-02-18 15:49:55 -0600
committerGitHub <noreply@github.com>2020-02-18 15:49:55 -0600
commit6f95967e95570ce6aa0c710abd3e2b522655a85e (patch)
treeb67449bb068a892566490d5292efed2bc83e52a4 /lib
parent53238af2dca54d2269f2494f6c41678b15896f75 (diff)
downloadspack-6f95967e95570ce6aa0c710abd3e2b522655a85e.tar.gz
spack-6f95967e95570ce6aa0c710abd3e2b522655a85e.tar.bz2
spack-6f95967e95570ce6aa0c710abd3e2b522655a85e.tar.xz
spack-6f95967e95570ce6aa0c710abd3e2b522655a85e.zip
buildcache: Check for tar.bz2 and set tar.gz if not found (#15054)
* Check for tar.bz2 and set tar.gz if not found * Move check for tarfile after it is extracted
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/binary_distribution.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index 49f8416d6f..9991a66965 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -596,6 +596,10 @@ def extract_tarball(spec, filename, allow_root=False, unsigned=False,
with closing(tarfile.open(spackfile_path, 'r')) as tar:
tar.extractall(tmpdir)
+ # older buildcache tarfiles use gzip compression
+ if not os.path.exists(tarfile_path):
+ tarfile_name = tarball_name(spec, '.tar.gz')
+ tarfile_path = os.path.join(tmpdir, tarfile_name)
if not unsigned:
if os.path.exists('%s.asc' % specfile_path):
try: