mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
import: gnu: Fix the detection of non-GNU packages.
* guix/import/gnu.scm (gnu->guix-package): Move the 'find-package' call before the 'latest-release' call, which would fail when the package did not have an entry on the FTP server.
This commit is contained in:
parent
2c9d481c90
commit
889f425b35
1 changed files with 13 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
|
||||||
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -111,19 +112,17 @@ (define* (gnu->guix-package name
|
||||||
"Return the package declaration for NAME as an s-expression. Use
|
"Return the package declaration for NAME as an s-expression. Use
|
||||||
KEY-DOWNLOAD as the OpenPGP key download policy (see 'download-tarball' for
|
KEY-DOWNLOAD as the OpenPGP key download policy (see 'download-tarball' for
|
||||||
details.)"
|
details.)"
|
||||||
(match (latest-release name)
|
(let ((package (find-package name)))
|
||||||
((? upstream-source? release)
|
(unless package
|
||||||
(let ((version (upstream-source-version release)))
|
(raise (formatted-message (G_ "no GNU package found for ~a") name)))
|
||||||
(match (find-package name)
|
|
||||||
(#f
|
(match (latest-release name)
|
||||||
(raise (formatted-message
|
((? upstream-source? release)
|
||||||
(G_ "couldn't find meta-data for GNU ~a")
|
(let ((version (upstream-source-version release)))
|
||||||
name)))
|
(gnu-package->sexp package release #:key-download key-download)))
|
||||||
(info
|
(_
|
||||||
(gnu-package->sexp info release #:key-download key-download)))))
|
(raise (formatted-message
|
||||||
(_
|
(G_ "failed to determine latest release of GNU ~a")
|
||||||
(raise (formatted-message
|
name))))))
|
||||||
(G_ "failed to determine latest release of GNU ~a")
|
|
||||||
name)))))
|
|
||||||
|
|
||||||
;;; gnu.scm ends here
|
;;; gnu.scm ends here
|
||||||
|
|
Loading…
Reference in a new issue