Subject: bug#59168: ‘--with-latest’ doesn’t pick the right compressed tarball

From: Ludovic Courtès <[email-masked]>
Date: Thu, 10 Nov 2022 13:13:21 +0100

Right now we get:

--8<---------------cut here---------------start------------->8---
$ guix build make --with-latest=make

Starting download of /tmp/guix-file.iV1Drd
>From https://ftpmirror.gnu.org/gnu/make/make-4.4.tar.lz...
following redirection to `https://mirror.cyberbits.eu/gnu/make/make-4.4.tar.lz'...
following redirection to `https://rap.mirror.cyberbits.eu/gnu/make/make-4.4.tar.lz'...
 …4.tar.lz  1.2MiB                                     15.9MiB/s 00:00 [##################] 100.0%

Starting download of /tmp/guix-file.e9zE8F
>From https://ftpmirror.gnu.org/gnu/make/make-4.4.tar.lz.sig...
following redirection to `https://mirror.cyberbits.eu/gnu/make/make-4.4.tar.lz.sig'...
following redirection to `https://rap.mirror.cyberbits.eu/gnu/make/make-4.4.tar.lz.sig'...
 …tar.lz.sig  566B                                      438KiB/s 00:00 [##################] 100.0%
gpgv: Signature made Mon 31 Oct 2022 07:49:17 AM CET
gpgv:                using RSA key B2508A90102F8AE3B12A0090DEACCAAEDB78137A
gpgv: Good signature from "Paul D. Smith <[email-masked]>"
gpgv:                 aka "Paul D. Smith <[email-masked]>"
The following derivation will be built:
  /gnu/store/aajiqll3kmhmgzc9xvy91wwsjgndll4h-make-4.4.drv

[…]
starting phase `unpack'
tar (child): lzip: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
[…]

builder for `/gnu/store/9wi7i1wimwd4h6fz5hx8kc96x523j2s4-make-4.4-debug' failed previously (cached)
build of /gnu/store/aajiqll3kmhmgzc9xvy91wwsjgndll4h-make-4.4.drv failed
--8<---------------cut here---------------end--------------->8---

This is because the <upstream-source> gexp compiler picks the first
source that comes up, which happens to be tar.lz, rather than tar.gz,
which would work.

Ludo’.