mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -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)
|
(let ((file (if (string-prefix? "/" file)
|
||||||
file
|
file
|
||||||
(search-path %load-path file))))
|
(search-path %load-path file))))
|
||||||
(and file
|
(if (and file
|
||||||
(string-prefix? (%store-prefix) file)
|
(string-prefix? (%store-prefix) file))
|
||||||
|
(filter-map
|
||||||
(filter-map
|
(lambda (entry)
|
||||||
(lambda (entry)
|
(let ((item (manifest-entry-item entry)))
|
||||||
(let ((item (manifest-entry-item entry)))
|
(and (or (string-prefix? item file)
|
||||||
(and (or (string-prefix? item file)
|
(string=? "guix" (manifest-entry-name entry)))
|
||||||
(string=? "guix" (manifest-entry-name entry)))
|
(manifest-entry-channel entry))))
|
||||||
(manifest-entry-channel entry))))
|
(current-profile-entries))
|
||||||
(current-profile-entries)))))))
|
'())))))
|
||||||
|
|
||||||
(define (package-provenance package)
|
(define (package-provenance package)
|
||||||
"Return the provenance of PACKAGE as an sexp for use as the 'provenance'
|
"Return the provenance of PACKAGE as an sexp for use as the 'provenance'
|
||||||
|
|
Loading…
Reference in a new issue