aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-27 23:20:59 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-28 00:38:19 +0100
commitb03218d5326ba6fbb59d9425fb06a8aee9ed73a4 (patch)
tree5d89e31a4802c17b57ae43223b843e823929ebbd
parentd61b2482dfbf5428b6ea366b4daa9aba8209c169 (diff)
downloadguix-b03218d5326ba6fbb59d9425fb06a8aee9ed73a4.tar
guix-b03218d5326ba6fbb59d9425fb06a8aee9ed73a4.tar.gz
gnu-maintenance: Honor 'upstream-name' property in GNU updater.
* guix/gnu-maintenance.scm (gnu-package?): Honor the 'usptream-name' property of PACKAGE. (ftp-server/directory): Likewise.
-rw-r--r--guix/gnu-maintenance.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 789724c8c0..499967eb89 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -195,7 +195,9 @@ network to check in GNU's database."
(or (gnu-home-page? package)
(let ((url (and=> (package-source package) origin-uri))
- (name (package-name package)))
+ (name (or (assq-ref (package-properties package)
+ 'upstream-name)
+ (package-name package))))
(case (and (string? url) (mirror-type url))
((gnu) #t)
((non-gnu) #f)
@@ -210,10 +212,12 @@ network to check in GNU's database."
(define (ftp-server/directory package)
"Return the FTP server and directory where PACKAGE's tarball are stored."
- (values (or (assoc-ref (package-properties package) 'ftp-server)
- "ftp.gnu.org")
- (or (assoc-ref (package-properties package) 'ftp-directory)
- (string-append "/gnu/" (package-name package)))))
+ (let ((name (or (assq-ref (package-properties package) 'upstream-name)
+ (package-name package))))
+ (values (or (assoc-ref (package-properties package) 'ftp-server)
+ "ftp.gnu.org")
+ (or (assoc-ref (package-properties package) 'ftp-directory)
+ (string-append "/gnu/" name)))))
(define (sans-extension tarball)
"Return TARBALL without its .tar.* or .zip extension."