diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-07-03 22:48:04 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-07-03 23:53:31 +0200 |
commit | f54cbc0e1b84a5b3785d3b4734600387dde82be9 (patch) | |
tree | 779daded7c593c31f9f68f950de166716fbdec14 /guix/gnu-maintenance.scm | |
parent | 00290e7365aed9b34603bfb3cd6e8a4bdc1e7259 (diff) |
import: Do not assume that 'package-source' returns an origin.
* guix/gnu-maintenance.scm (gnu-package?): Check whether
'package-source' returns an origin.
* guix/import/github.scm (updated-github-url): Likewise.
* guix/import/launchpad.scm (updated-launchpad-url): Likewise.
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r-- | guix/gnu-maintenance.scm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index ef067704ad..9fe229f680 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; ;;; This file is part of GNU Guix. @@ -207,14 +207,17 @@ network to check in GNU's database." (member host '("www.gnu.org" "gnu.org")))))) (or (gnu-home-page? package) - (let ((url (and=> (package-source package) origin-uri)) - (name (package-upstream-name package))) - (case (and (string? url) (mirror-type url)) - ((gnu) #t) - ((non-gnu) #f) - (else - (and (member name (map gnu-package-name (official-gnu-packages))) - #t)))))))) + (match (package-source package) + ((? origin? origin) + (let ((url (origin-uri origin)) + (name (package-upstream-name package))) + (case (and (string? url) (mirror-type url)) + ((gnu) #t) + ((non-gnu) #f) + (else + (and (member name (map gnu-package-name (official-gnu-packages))) + #t))))) + (_ #f)))))) ;;; |