GNU bug report logs -
#75137
[PATCH 0/4] 'package-with-upstream-version' can preserve archive type
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri, 27 Dec 2024 10:56:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 75137 <at> debbugs.gnu.org (full text, mbox):
* guix/upstream.scm (download-tarball, package-update/url-fetch): Use
SRFI-71 instead of SRFI-11.
Change-Id: Ic7ca79b8e1248d01fd48a07faad3a6fa6a1d0c5f
---
guix/upstream.scm | 35 ++++++++++++++++-------------------
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/guix/upstream.scm b/guix/upstream.scm
index 0593c363aa..d680199578 100644
--- a/guix/upstream.scm
+++ b/guix/upstream.scm
@@ -44,7 +44,6 @@ (define-module (guix upstream)
#:use-module (guix monads)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
- #:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
@@ -339,12 +338,11 @@ (define* (download-tarball store url signature-url
(mbegin %store-monad
(built-derivations (list drv))
(return (derivation->output-path drv))))))))
- (let-values (((status data)
- (if sig
- (gnupg-verify* sig data
- #:server key-server
- #:key-download key-download)
- (values 'missing-signature data))))
+ (let ((status data (if sig
+ (gnupg-verify* sig data
+ #:server key-server
+ #:key-download key-download)
+ (values 'missing-signature data))))
(match status
('valid-signature
tarball)
@@ -438,18 +436,17 @@ (define* (package-update/url-fetch store package source
SOURCE, an <upstream-source>."
(match source
(($ <upstream-source> _ version urls signature-urls)
- (let*-values (((archive-type)
- (package-archive-type package))
- ((url signature-url)
- ;; Try to find a URL that matches ARCHIVE-TYPE.
- (find2 (lambda (url sig-url)
- ;; Some URIs lack a file extension, like
- ;; 'https://crates.io/???/0.1/download'. In that
- ;; case, pick the first URL.
- (or (not archive-type)
- (string-suffix? archive-type url)))
- urls
- (or signature-urls (circular-list #f)))))
+ (let* ((archive-type (package-archive-type package))
+ (url signature-url
+ ;; Try to find a URL that matches ARCHIVE-TYPE.
+ (find2 (lambda (url sig-url)
+ ;; Some URIs lack a file extension, like
+ ;; 'https://crates.io/???/0.1/download'. In that
+ ;; case, pick the first URL.
+ (or (not archive-type)
+ (string-suffix? archive-type url)))
+ urls
+ (or signature-urls (circular-list #f)))))
;; If none of URLS matches ARCHIVE-TYPE, then URL is #f; in that case,
;; pick up the first element of URLS.
(let ((tarball (download-tarball store
--
2.46.0
This bug report was last modified 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.