mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
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.
This commit is contained in:
parent
b6c7e5af02
commit
4dfce0115f
1 changed files with 10 additions and 10 deletions
|
@ -156,16 +156,16 @@ (define (package-channels package)
|
|||
(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'
|
||||
|
|
Loading…
Reference in a new issue