diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-03-22 12:31:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-22 12:42:52 +0100 |
commit | 91601790d00bbfcdc943b974779cb3d153341ef6 (patch) | |
tree | 5ac61aa0145a6fb23f8709ec703b1765d5f2980f | |
parent | 3e6f65be7ae6f895ceb38f9a129c95e08761182b (diff) | |
download | guix-91601790d00bbfcdc943b974779cb3d153341ef6.tar.gz |
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.
-rw-r--r-- | guix/packages.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 4ab8650340..70b1478c91 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)))) (_ |