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
This commit is contained in:
parent
53238af2dc
commit
6f95967e95
@ -596,6 +596,10 @@ def extract_tarball(spec, filename, allow_root=False, unsigned=False,
|
|||||||
|
|
||||||
with closing(tarfile.open(spackfile_path, 'r')) as tar:
|
with closing(tarfile.open(spackfile_path, 'r')) as tar:
|
||||||
tar.extractall(tmpdir)
|
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 not unsigned:
|
||||||
if os.path.exists('%s.asc' % specfile_path):
|
if os.path.exists('%s.asc' % specfile_path):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user