From: "Ludovic Courtès" <ludo@gnu.org>
To: 75137@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
"Christopher Baines" <guix@cbaines.net>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ludovic Courtès" <ludo@gnu.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#75137] [PATCH 1/4] upstream: Switch to SRFI-71.
Date: Fri, 27 Dec 2024 11:56:40 +0100 [thread overview]
Message-ID: <1878ae44b216f1f8b92efb19a7a67b435af23c90.1735296761.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1735296761.git.ludo@gnu.org>
* 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
next prev parent reply other threads:[~2024-12-27 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 10:55 [bug#75137] [PATCH 0/4] 'package-with-upstream-version' can preserve archive type Ludovic Courtès
2024-12-27 10:56 ` Ludovic Courtès [this message]
2024-12-27 10:56 ` [bug#75137] [PATCH 2/4] upstream: Extract ‘preferred-upstream-source-url’ Ludovic Courtès
2024-12-27 10:56 ` [bug#75137] [PATCH 3/4] upstream: Define ‘preferred-upstream-source’ Ludovic Courtès
2024-12-27 10:56 ` [bug#75137] [PATCH 4/4] transformations: ‘package-with-upstream-version’ can preserve archive type Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1878ae44b216f1f8b92efb19a7a67b435af23c90.1735296761.git.ludo@gnu.org \
--to=ludo@gnu.org \
--cc=75137@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).