diff options
author | Leo Famulari <leo@famulari.name> | 2017-12-21 13:58:35 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-12-21 13:58:35 -0500 |
commit | f76fc968669721e3baa6a0662da8e9e9f5da66cf (patch) | |
tree | ae58b84d89f144fbec974b7e75b24574f99b2e33 /guix | |
parent | 24ee3b28c6def91e4e41dd46441a029ab01b6d00 (diff) | |
parent | 5dc0e0b055ce2ab12c40066cee34511cd7a5cf03 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r-- | guix/upstream.scm | 8 |
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) |