GNU bug report logs - #57704
[PATCH core-updates] guix: packages: Remove #f from inputs when sanitizing.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Fri, 9 Sep 2022 16:03:02 UTC

Severity: normal

Tags: moreinfo, patch

Full log


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

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: 57704 <at> debbugs.gnu.org
Cc: Maxime Devos <maximedevos <at> telenet.be>
Subject: [PATCH v3] guix: Filter unspecified inputs when sanitizing.
Date: Sat, 10 Sep 2022 09:41:39 +0200
* guix/packages.scm (sanitize-inputs): Filter inputs which are unspecified?
rather than adding a label.
---
 guix/packages.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index 94e464cd01..0975002c13 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -429,12 +429,15 @@ (define %cuirass-supported-systems
 
 (define-inlinable (sanitize-inputs inputs)
   "Sanitize INPUTS by turning it into a list of name/package tuples if it's
-not already the case."
+not already the case and removing unspecified inputs."
   (cond ((null? inputs) inputs)
         ((and (pair? (car inputs))
               (string? (caar inputs)))
          inputs)
-        (else (map add-input-label inputs))))
+        (else (filter-map (lambda (input)
+                            (if (unspecified? input) #f
+                                (add-input-label input)))
+                          inputs))))
 
 (define-syntax current-location-vector
   (lambda (s)
-- 
2.37.2





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

Previous Next


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