summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-12-21 13:58:35 -0500
committerLeo Famulari <leo@famulari.name>2017-12-21 13:58:35 -0500
commitf76fc968669721e3baa6a0662da8e9e9f5da66cf (patch)
treeae58b84d89f144fbec974b7e75b24574f99b2e33 /guix
parent24ee3b28c6def91e4e41dd46441a029ab01b6d00 (diff)
parent5dc0e0b055ce2ab12c40066cee34511cd7a5cf03 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r--guix/upstream.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 0fe3308876..caaa0e44e4 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -278,7 +278,13 @@ and 'interactive' (default)."
((archive-type)
(match (and=> (package-source package) origin-uri)
((? string? uri)
- (file-extension (basename uri)))
+ (let ((type (file-extension (basename uri))))
+ ;; Sometimes we have URLs such as
+ ;; "https://github.com/…/tarball/v0.1", in which case
+ ;; we must not consider "1" as the extension.
+ (and (or (string-contains type "z")
+ (string=? type "tar"))
+ type)))
(_
"gz")))
((url signature-url)