From f20e34d8f68f29eea2ba7a0bf67f042aeb67d24c Mon Sep 17 00:00:00 2001 From: Nikolaos Chatzikonstantinou Date: Thu, 31 Oct 2024 06:45:53 -0400 Subject: [PATCH 2/2] download zst msys2 sources before gzip admin/nt/dist-build/build-dep-zips.py (gather_source): The previous version assumed that all source tarballs were gzip compressed. This is not always the case, as some are only available in zst. We prioritize zst compression and only if not available we attempt gzip. --- admin/nt/dist-build/build-dep-zips.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/admin/nt/dist-build/build-dep-zips.py b/admin/nt/dist-build/build-dep-zips.py index bb0ff7e32bf..022cebeedaf 100755 --- a/admin/nt/dist-build/build-dep-zips.py +++ b/admin/nt/dist-build/build-dep-zips.py @@ -23,7 +23,7 @@ import functools import operator -from subprocess import check_output +from subprocess import check_output, CalledProcessError ## Constants EMACS_MAJOR_VERSION="28" @@ -206,9 +206,13 @@ def gather_source(deps): ## Switch names if necessary pkg_name = MUNGE_SRC_PKGS.get(pkg_name,pkg_name) + tarzst = "{}-{}.src.tar.zst".format(pkg_name,pkg_version) tarball = "{}-{}.src.tar.gz".format(pkg_name,pkg_version) - download_source(tarball) + try: + download_source(tarzst) + except CalledProcessError: + download_source(tarball) print("Zipping") check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *" -- 2.39.5