From: Ricardo Wurmus <rekado@elephly.net>
To: 42912@debbugs.gnu.org
Subject: bug#42912: Acknowledgement (cran.git importer fails because with-store swallows extra values.)
Date: Tue, 18 Aug 2020 12:40:58 +0200 [thread overview]
Message-ID: <87pn7oxmmd.fsf@elephly.net> (raw)
In-Reply-To: <handler.42912.B.15977442299543.ack@debbugs.gnu.org>
This hack works around the problem:
--8<---------------cut here---------------start------------->8---
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index a1275b4822..e10ea25587 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -197,10 +197,17 @@ bioconductor package NAME, or #F if the package is unknown."
(define download
(memoize
(lambda* (url #:key method)
+ (define v1 #f)
+ (define v2 #f)
(with-store store
(cond
((eq? method 'git)
- (latest-repository-commit store url))
+ (call-with-values
+ (lambda ()
+ (latest-repository-commit store url))
+ (lambda (dir commit)
+ (set! v1 dir)
+ (set! v2 commit))))
((eq? method 'hg)
(call-with-temporary-directory
(lambda (dir)
@@ -214,8 +221,10 @@ bioconductor package NAME, or #F if the package is unknown."
(find-files dir "^\\.hg$" #:directories? #t))
(let ((store-directory
(add-to-store store (basename url) #t "sha256" dir)))
- (values store-directory changeset)))))))
- (else (download-to-store store url)))))))
+ (set! v1 store-directory)
+ (set! v2 changeset)))))))
+ (else (set! v1 (download-to-store store url)))))
+ (values v1 v2))))
(define (fetch-description repository name)
"Return an alist of the contents of the DESCRIPTION file for the R package
--8<---------------cut here---------------end--------------->8---
--
Ricardo
next prev parent reply other threads:[~2020-08-18 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 9:50 bug#42912: cran.git importer fails because with-store swallows extra values Ricardo Wurmus
[not found] ` <handler.42912.B.15977442299543.ack@debbugs.gnu.org>
2020-08-18 10:40 ` Ricardo Wurmus [this message]
2020-08-28 21:31 ` Ludovic Courtès
2020-08-29 7:36 ` Ricardo Wurmus
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=87pn7oxmmd.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=42912@debbugs.gnu.org \
/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).