guix-commits
[Top][All Lists]
Advanced

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

15/16: packages: 'package-field-location' handles missing source propert


From: guix-commits
Subject: 15/16: packages: 'package-field-location' handles missing source properties.
Date: Sun, 22 Mar 2020 07:43:15 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 91601790d00bbfcdc943b974779cb3d153341ef6
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sun Mar 22 12:31:07 2020 +0100

    packages: 'package-field-location' handles missing source properties.
    
    This is a followup to f2b24f01f42c1bad3ddffd140194de1aec38a5f8.
    
    * guix/packages.scm (package-field-location): Check whether
    'source-properties->location' returns #f.  This fixes the case where
    'source-properties' returns the empty list.
---
 guix/packages.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index 4ab8650..70b1478 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -363,12 +363,12 @@ object."
                 (let ((field (assoc field inits)))
                   (match field
                     ((_ value)
-                     (let ((props (source-properties value)))
-                       (and props
+                     (let ((loc (and=> (source-properties value)
+                                       source-properties->location)))
+                       (and loc
                             ;; Preserve the original file name, which may be a
                             ;; relative file name.
-                            (let ((loc (source-properties->location props)))
-                              (set-field loc (location-file) file)))))
+                            (set-field loc (location-file) file))))
                     (_
                      #f))))
                (_



reply via email to

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