From 40fcb94e2f7ab1df8d320f78311e623f801d8602 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Mon, 23 Sep 2024 16:42:54 +0200 Subject: [PATCH] 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 Acked-by: Adrien 'neox' Bourmault --- resources/guix/gnuboot/packages/trisquel-netinst.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/guix/gnuboot/packages/trisquel-netinst.scm b/resources/guix/gnuboot/packages/trisquel-netinst.scm index ecb30d4..3095199 100644 --- a/resources/guix/gnuboot/packages/trisquel-netinst.scm +++ b/resources/guix/gnuboot/packages/trisquel-netinst.scm @@ -277,10 +277,11 @@ manually.") (lambda _ (mkdir-p (string-append #$output "/share/trisquel-installer/")) (install-file "preseed.img" (string-append #$output "/share/trisquel-installer/")))) - (replace - 'check - (lambda _ - (invoke "sha512sum" "-c" "preseed.img.sha512")))))) + (replace + 'check + (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