[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: describe: Make sure package-channels always retur
From: |
guix-commits |
Subject: |
branch master updated: describe: Make sure package-channels always returns a list. |
Date: |
Thu, 25 Feb 2021 04:25:40 -0500 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 4dfce01 describe: Make sure package-channels always returns a list.
4dfce01 is described below
commit 4dfce0115f3d09945bf9f5a0775ffbf20ba39c79
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Thu Feb 25 10:24:11 2021 +0100
describe: Make sure package-channels always returns a list.
* guix/describe.scm (package-channels): Return an empty list if the file
origin could not be determined.
---
guix/describe.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/guix/describe.scm b/guix/describe.scm
index 46448de..0683ad8 100644
--- a/guix/describe.scm
+++ b/guix/describe.scm
@@ -156,16 +156,16 @@ not be determined."
(let ((file (if (string-prefix? "/" file)
file
(search-path %load-path file))))
- (and file
- (string-prefix? (%store-prefix) file)
-
- (filter-map
- (lambda (entry)
- (let ((item (manifest-entry-item entry)))
- (and (or (string-prefix? item file)
- (string=? "guix" (manifest-entry-name entry)))
- (manifest-entry-channel entry))))
- (current-profile-entries)))))))
+ (if (and file
+ (string-prefix? (%store-prefix) file))
+ (filter-map
+ (lambda (entry)
+ (let ((item (manifest-entry-item entry)))
+ (and (or (string-prefix? item file)
+ (string=? "guix" (manifest-entry-name entry)))
+ (manifest-entry-channel entry))))
+ (current-profile-entries))
+ '())))))
(define (package-provenance package)
"Return the provenance of PACKAGE as an sexp for use as the 'provenance'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: describe: Make sure package-channels always returns a list.,
guix-commits <=