gnu-maintenance: Fix `gnu-package?' for packages lacking a `source'.

* guix/gnu-maintenance.scm (gnu-package?): Support PACKAGE when its
  source is #f.
This commit is contained in:
Ludovic Courtès 2013-03-05 22:25:40 +01:00
parent 19777ae6ea
commit 296540a6db
1 changed files with 4 additions and 3 deletions

View File

@ -84,9 +84,10 @@
network to check in GNU's database."
;; TODO: Find a way to determine that a package is non-GNU without going
;; through the network.
(let ((url (origin-uri (package-source package))))
(or (string-prefix? "mirror://gnu" url)
(member (package-name package) (official-gnu-packages)))))))
(let ((url (and=> (package-source package) origin-uri)))
(or (and (string? url) (string-prefix? "mirror://gnu" url))
(and (member (package-name package) (official-gnu-packages))
#t))))))
;;;