GNU bug report logs - #42912
cran.git importer fails because with-store swallows extra values.

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Tue, 18 Aug 2020 09:51:02 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42912 in the body.
You can then email your comments to 42912 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#42912; Package guix. (Tue, 18 Aug 2020 09:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 18 Aug 2020 09:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: cran.git importer fails because with-store swallows extra values.
Date: Tue, 18 Aug 2020 11:50:09 +0200
The “cran” importer has support for git and hg repositories.  This no
longer works, because the “download” is supposed to return multiple
values.  Seemingly due to the use of “with-store” it no longer returns
multiple values, so the “git” and “hg” archives no longer work.

-- 
Ricardo




Information forwarded to bug-guix <at> gnu.org:
bug#42912; Package guix. (Tue, 18 Aug 2020 10:42:02 GMT) Full text and rfc822 format available.

Message #8 received at 42912 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 42912 <at> debbugs.gnu.org
Subject: Re: bug#42912: Acknowledgement (cran.git importer fails because
 with-store swallows extra values.)
Date: Tue, 18 Aug 2020 12:40:58 +0200
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




Information forwarded to bug-guix <at> gnu.org:
bug#42912; Package guix. (Fri, 28 Aug 2020 21:32:01 GMT) Full text and rfc822 format available.

Message #11 received at 42912 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 42912 <at> debbugs.gnu.org
Subject: Re: bug#42912: cran.git importer fails because with-store swallows
 extra values.
Date: Fri, 28 Aug 2020 23:31:01 +0200
Howdy Ricardo!

Ricardo Wurmus <rekado <at> elephly.net> skribis:

> The “cran” importer has support for git and hg repositories.  This no
> longer works, because the “download” is supposed to return multiple
> values.  Seemingly due to the use of “with-store” it no longer returns
> multiple values, so the “git” and “hg” archives no longer work.

I believe 3d9ea605c8dfb7fc43689e12975218b032b3175a fixes this, though I
don’t know how to test it.

If you can confirm it does, feel free to close this bug.

Thanks,
Ludo’.




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Sat, 29 Aug 2020 07:37:02 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Sat, 29 Aug 2020 07:37:02 GMT) Full text and rfc822 format available.

Message #16 received at 42912-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 42912-done <at> debbugs.gnu.org
Subject: Re: bug#42912: cran.git importer fails because with-store swallows
 extra values.
Date: Sat, 29 Aug 2020 09:36:08 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> I believe 3d9ea605c8dfb7fc43689e12975218b032b3175a fixes this, though I
> don’t know how to test it.
>
> If you can confirm it does, feel free to close this bug.

It looks like it’s indeed fixed.  Thank you!

I tested with this command:

    guix import cran -a git https://github.com/immunogenomics/harmony

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.