mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu-maintenance: Replace 'find-packages' with 'find-package' (singular).
Fixes <http://bugs.gnu.org/23718>. Reported by Efraim Flashner <efraim@flashner.co.il>. * guix/gnu-maintenance.scm (find-packages): Remove. (find-package): New procedure. * guix/import/gnu.scm (gnu->guix-package): Use 'find-package' instead of 'find-packages' and adjust accordingly.
This commit is contained in:
parent
ae76830857
commit
dc794a7238
2 changed files with 12 additions and 13 deletions
|
@ -48,7 +48,7 @@ (define-module (guix gnu-maintenance)
|
|||
gnu-package-download-url
|
||||
|
||||
official-gnu-packages
|
||||
find-packages
|
||||
find-package
|
||||
gnu-package?
|
||||
|
||||
release-file?
|
||||
|
@ -155,13 +155,12 @@ (define official-description
|
|||
(close-port port)
|
||||
lst)))
|
||||
|
||||
(define (find-packages regexp)
|
||||
"Find GNU packages which satisfy REGEXP."
|
||||
(let ((name-rx (make-regexp regexp)))
|
||||
(filter (lambda (package)
|
||||
(false-if-exception
|
||||
(regexp-exec name-rx (gnu-package-name package))))
|
||||
(official-gnu-packages))))
|
||||
(define (find-package name)
|
||||
"Find GNU package called NAME and return it. Return #f if it was not
|
||||
found."
|
||||
(find (lambda (package)
|
||||
(string=? name (gnu-package-name package)))
|
||||
(official-gnu-packages)))
|
||||
|
||||
(define gnu-package?
|
||||
(memoize
|
||||
|
|
|
@ -111,13 +111,13 @@ (define* (gnu->guix-package name
|
|||
(match (latest-release name)
|
||||
((? upstream-source? release)
|
||||
(let ((version (upstream-source-version release)))
|
||||
(match (find-packages (regexp-quote name))
|
||||
((info . _)
|
||||
(gnu-package->sexp info release #:key-download key-download))
|
||||
(()
|
||||
(match (find-package name)
|
||||
(#f
|
||||
(raise (condition
|
||||
(&message
|
||||
(message "couldn't find meta-data for GNU package"))))))))
|
||||
(message "couldn't find meta-data for GNU package")))))
|
||||
(info
|
||||
(gnu-package->sexp info release #:key-download key-download)))))
|
||||
(_
|
||||
(raise (condition
|
||||
(&message
|
||||
|
|
Loading…
Reference in a new issue