summaryrefslogtreecommitdiff
path: root/guix/upstream.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/upstream.scm')
-rw-r--r--guix/upstream.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 70cbfb45e8..6584d5e4c4 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -369,7 +369,7 @@ SOURCE, an <upstream-source>."
(let*-values (((archive-type)
(match (and=> (package-source package) origin-uri)
((? string? uri)
- (let ((type (file-extension (basename uri))))
+ (let ((type (or (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.
@@ -417,12 +417,13 @@ values: 'always', 'never', and 'interactive' (default)."
#f))))
(match (assq method %method-updates)
(#f
- (raise (condition (&message
- (message (format #f (G_ "cannot download for \
+ (raise (make-compound-condition
+ (formatted-message (G_ "cannot download for \
this method: ~s")
- method)))
- (&error-location
- (location (package-location package))))))
+ method)
+ (condition
+ (&error-location
+ (location (package-location package)))))))
((_ . update)
(update store package source
#:key-download key-download)))))