GNU bug report logs - #51771
[PATCH 1/2] gnu: linux: Support numbers and strings in options.

Previous Next

Package: guix-patches;

Reported by: phodina <phodina <at> protonmail.com>

Date: Thu, 11 Nov 2021 19:03:02 UTC

Severity: normal

Tags: patch

Full log


Message #14 received at 51771 <at> debbugs.gnu.org (full text, mbox):

From: phodina <phodina <at> protonmail.com>
To: "51771 <at> debbugs.gnu.org" <51771 <at> debbugs.gnu.org>
Subject: Re: [PATCH 2/2] gnu: Add linux-libre-with-waydroid.
Date: Sat, 13 Nov 2021 10:49:29 +0000
[PATCH v2 1/2] gnu: linux: Support numbers and strings in options.

* gnu/packages/linux.scm: Match numbers and strings in options.

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f386139638..cfc09580a3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -724,12 +724,16 @@ (define %bpf-extra-linux-options

 (define (config->string options)
   (string-join (map (match-lambda
-                      ((option . 'm)
-                       (string-append option "=m"))
-                      ((option . #t)
-                       (string-append option "=y"))
                       ((option . #f)
-                       (string-append option "=n")))
+                       (format #f "# ~a is not set" option))
+                      ((option . #t)
+                       (format #f "~a=y" option))
+                      ((option . 'm)
+                       (format #f "~a=m" option))
+                      ((option . (? number? value))
+                       (format #f "~a=~a" option value))
+                      ((option . (? string? value))
+                       (format #f "~a=\"~a\"" option value)))
                     options)
                "\n"))

--
2.33.0




This bug report was last modified 1 year and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.