[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: import: github: Better tolerate unexpected file extensions.
From: |
Ludovic Courtès |
Subject: |
05/09: import: github: Better tolerate unexpected file extensions. |
Date: |
Fri, 27 Jan 2017 23:38:49 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 21f4a7c116ed884314f29a8dc69ed18092b35477
Author: Ludovic Courtès <address@hidden>
Date: Fri Jan 27 23:49:52 2017 +0100
import: github: Better tolerate unexpected file extensions.
* guix/import/github.scm (find-extension): Add ".tbz".
(updated-github-url): When 'find-extension' returns #f, use "" for EXT.
---
guix/import/github.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/guix/import/github.scm b/guix/import/github.scm
index 1e0bb53..b249b39 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -49,7 +49,8 @@
"Return the extension of the archive e.g. '.tar.gz' given a URL, or
false if none is recognized"
(find (lambda (x) (string-suffix? x url))
- (list ".tar.gz" ".tar.bz2" ".tar.xz" ".zip" ".tar" ".tgz" ".love")))
+ (list ".tar.gz" ".tar.bz2" ".tar.xz" ".zip" ".tar"
+ ".tgz" ".tbz" ".love")))
(define (updated-github-url old-package new-version)
;; Return a url for the OLD-PACKAGE with NEW-VERSION. If no source url in
@@ -57,7 +58,7 @@ false if none is recognized"
(define (updated-url url)
(if (string-prefix? "https://github.com/" url)
- (let ((ext (find-extension url))
+ (let ((ext (or (find-extension url) ""))
(name (package-name old-package))
(version (package-version old-package))
(prefix (string-append "https://github.com/"
- branch master updated (d61b248 -> b45dbfc), Ludovic Courtès, 2017/01/27
- 03/09: gnu: emacs-emms: Add 'upstream-name' property., Ludovic Courtès, 2017/01/27
- 08/09: doc: Add missing Upstart command for the binary installation., Ludovic Courtès, 2017/01/27
- 07/09: doc: Add 'cups-configuration' example with 'hplip'., Ludovic Courtès, 2017/01/27
- 09/09: tests: Adjust pypi test to recent importer change., Ludovic Courtès, 2017/01/27
- 05/09: import: github: Better tolerate unexpected file extensions.,
Ludovic Courtès <=
- 01/09: gnu-maintenance: Honor 'upstream-name' property in GNU updater., Ludovic Courtès, 2017/01/27
- 02/09: gnu-maintenance: GNU updater handles gnu.org-hosted Emacs packages., Ludovic Courtès, 2017/01/27
- 04/09: gnu-maintenance: 'gnu-package?' ignores invalid URLs., Ludovic Courtès, 2017/01/27
- 06/09: packages: Add 'package-upstream-name' and use it., Ludovic Courtès, 2017/01/27