guix: gnuboot-trisquel-preseed.img: enable to disable tests.

The image resulting from the gnuboot-trisquel-preseed.img package is
checked against checksums inside the 'check function of this package.

If for some reasons we want to update the checksums, an easy way to do
it is to build the package but not run the 'check function and do the
checksum on the resulting file. The Guix 1.4.0 manual explains how to
not run 'check with the "--without-tests=package" option in the
"10.1.2 Package Transformation Options" section.

However if we attempt that with the following command, the
without-tests has no impact at all:
    $ guix time-machine --commit=v1.4.0 -- build -L resources/guix/ \
    gnuboot-trisquel-preseed.img \
    --without-tests=gnuboot-trisquel-preseed.img

This changes makes the above command work as expected.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2024-09-23 16:42:54 +02:00 committed by Adrien 'neox' Bourmault
parent bcb729a8aa
commit 40fcb94e2f
Signed by: neox
GPG Key ID: 57BC26A3687116F6
1 changed files with 5 additions and 4 deletions

View File

@ -279,8 +279,9 @@ manually.")
(install-file "preseed.img" (string-append #$output "/share/trisquel-installer/"))))
(replace
'check
(lambda _
(invoke "sha512sum" "-c" "preseed.img.sha512"))))))
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "sha512sum" "-c" "preseed.img.sha512")))))))
(synopsis "Preseed configuration as a FAT12 filesystem.")
(description "FAT12 filesystem with inside a preseed.cfg file for automatic install,
as well as dependencies for the preseed.cfg, such as the files