From 2bc0c0ea59eeb81601bb6a1cc416100f0a8989ea Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 25 Jun 2021 10:37:23 -0500 Subject: [PATCH] Add support for .tbz file extensions (#24479) --- lib/spack/spack/test/url_parse.py | 2 ++ lib/spack/spack/util/compression.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py index 332c988fca..ae6bdf76f2 100644 --- a/lib/spack/spack/test/url_parse.py +++ b/lib/spack/spack/test/url_parse.py @@ -429,6 +429,8 @@ def test_url_parse_offset(name, noffset, ver, voffset, path): # .tgz ('ADOL-C', '2.6.1', 'http://www.coin-or.org/download/source/ADOL-C/ADOL-C-2.6.1.tgz'), + # .tbz + ('mpfr', '4.0.1', 'https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.tbz'), # .tbz2 ('mpfr', '4.0.1', 'https://ftpmirror.gnu.org/mpfr/mpfr-4.0.1.tbz2'), # .txz diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py index a1a0e1d6f3..09d391e640 100644 --- a/lib/spack/spack/util/compression.py +++ b/lib/spack/spack/util/compression.py @@ -11,7 +11,7 @@ # Supported archive extensions. PRE_EXTS = ["tar", "TAR"] EXTS = ["gz", "bz2", "xz", "Z"] -NOTAR_EXTS = ["zip", "tgz", "tbz2", "txz"] +NOTAR_EXTS = ["zip", "tgz", "tbz", "tbz2", "txz"] # Add PRE_EXTS and EXTS last so that .tar.gz is matched *before* .tar or .gz ALLOWED_ARCHIVE_TYPES = [".".join(ext) for ext in product(