diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-01-28 00:11:33 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-01-28 00:38:20 +0100 |
commit | 3b0fcc672d48ed67a807b20bde5d2f963c285074 (patch) | |
tree | 22710221294efac261ebaf5895c21c437195059c /guix/gnu-maintenance.scm | |
parent | 21f4a7c116ed884314f29a8dc69ed18092b35477 (diff) | |
download | gnu-guix-3b0fcc672d48ed67a807b20bde5d2f963c285074.tar gnu-guix-3b0fcc672d48ed67a807b20bde5d2f963c285074.tar.gz |
packages: Add 'package-upstream-name' and use it.
* guix/packages.scm (package-upstream-name): New procedure.
* guix/gnu-maintenance.scm (gnu-package?, ftp-server/directory)
(latest-release*, latest-gnome-release)
(latest-kde-release): Use it instead of the inline expression.
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r-- | guix/gnu-maintenance.scm | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 9c94992ab6..e4151c652c 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -201,9 +201,7 @@ network to check in GNU's database." (or (gnu-home-page? package) (let ((url (and=> (package-source package) origin-uri)) - (name (or (assq-ref (package-properties package) - 'upstream-name) - (package-name package)))) + (name (package-upstream-name package))) (case (and (string? url) (mirror-type url)) ((gnu) #t) ((non-gnu) #f) @@ -218,8 +216,7 @@ network to check in GNU's database." (define (ftp-server/directory package) "Return the FTP server and directory where PACKAGE's tarball are stored." - (let ((name (or (assq-ref (package-properties package) 'upstream-name) - (package-name package)))) + (let ((name (package-upstream-name package))) (values (or (assoc-ref (package-properties package) 'ftp-server) "ftp.gnu.org") (or (assoc-ref (package-properties package) 'ftp-directory) @@ -433,11 +430,9 @@ hosted on ftp.gnu.org, or not under that name (this is the case for \"emacs-auctex\", for instance.)" (let-values (((server directory) (ftp-server/directory package))) - (let ((name (or (assoc-ref (package-properties package) 'upstream-name) - (package-name package)))) - (false-if-ftp-error (latest-release name - #:server server - #:directory directory))))) + (false-if-ftp-error (latest-release (package-upstream-name package) + #:server server + #:directory directory)))) (define %package-name-rx ;; Regexp for a package name, e.g., "foo-X.Y". Since TeXmacs uses @@ -506,8 +501,7 @@ source URLs starts with PREFIX." (define upstream-name ;; Some packages like "NetworkManager" have camel-case names. - (or (assoc-ref (package-properties package) 'upstream-name) - (package-name package))) + (package-upstream-name package)) (false-if-ftp-error (latest-ftp-release upstream-name @@ -531,8 +525,7 @@ source URLs starts with PREFIX." (let ((uri (string->uri (origin-uri (package-source package))))) (false-if-ftp-error (latest-ftp-release - (or (assoc-ref (package-properties package) 'upstream-name) - (package-name package)) + (package-upstream-name package) #:server "mirrors.mit.edu" #:directory (string-append "/kde" (dirname (dirname (uri-path uri)))) |