gnuboot-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 01/15] guix: gnuboot-trisquel-preseed.img: enable to disable t


From: Denis 'GNUtoo' Carikli
Subject: [PATCH v1 01/15] guix: gnuboot-trisquel-preseed.img: enable to disable tests.
Date: Mon, 23 Sep 2024 16:42:54 +0200

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>
---
 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
-- 
2.46.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]