From 6f95967e95570ce6aa0c710abd3e2b522655a85e Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 18 Feb 2020 15:49:55 -0600 Subject: 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 --- lib/spack/spack/binary_distribution.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit v1.2.3-70-g09d2