guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

16/31: import/cran: Restore memoization for download procedure.


From: guix-commits
Subject: 16/31: import/cran: Restore memoization for download procedure.
Date: Thu, 28 Nov 2024 07:45:11 -0500 (EST)

rekado pushed a commit to branch r-team
in repository guix.

commit 64d9c7ea3fec163d86dde933471594ef2fe8c356
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Nov 28 12:00:30 2024 +0100

    import/cran: Restore memoization for download procedure.
    
    Fixes <https://issues.guix.gnu.org/44256>.
    
    * guix/import/cran.scm (cran-package-inputs): Avoid passing "#:method #f", 
so
    that there is only one memoization key in the default case.
    (fetch-description): Use the full list returned by BIOCONDUCTOR-URI.
    
    Change-Id: I532812b14f4e4d9542bfb9248555be1b09f7d92f
---
 guix/import/cran.scm | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 9bda257aec..55e388be77 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -329,7 +329,7 @@ from ~a: ~a (~a)~%")
                           (and (latest-bioconductor-package-version name 
'experiment) 'experiment)))
                 ;; TODO: Honor VERSION.
                 (version (latest-bioconductor-package-version name type))
-                (url     (car (bioconductor-uri name version type)))
+                (url     (bioconductor-uri name version type))
                 (meta    (fetch-description-from-tarball
                           url #:download (or replacement-download
                                              download))))
@@ -740,11 +740,11 @@ META."
 of META, a package in REPOSITORY."
   (let* ((url    (cran-package-source-url meta repository))
          (name   (assoc-ref meta "Package"))
-         (source (download-source url
-                                  #:method
-                                  (cond ((assoc-ref meta 'git) 'git)
-                                        ((assoc-ref meta 'hg) 'hg)
-                                        (else #f))))
+         (source (apply download-source url
+                        (cond
+                         ((assoc-ref meta 'git) '(#:method git))
+                         ((assoc-ref meta 'hg) '(#:method hg))
+                         (else '()))))
          (tarball? (not (or (assoc-ref meta 'git)
                             (assoc-ref meta 'hg))))
          (compare-upstream-inputs
@@ -857,10 +857,11 @@ from the alist META, which was derived from the R 
package's DESCRIPTION file."
          (source-url (cran-package-source-url meta repository))
          (git?       (if (assoc-ref meta 'git) #true #false))
          (hg?        (if (assoc-ref meta 'hg) #true #false))
-         (source     (download-source source-url #:method (cond
-                                                           (git? 'git)
-                                                           (hg? 'hg)
-                                                           (else #f))))
+         (source     (apply download-source source-url
+                            (cond
+                             (git? '(#:method git))
+                             (hg? '(#:method hg))
+                             (else '()))))
          (uri-helper (uri-helper repository))
          (inputs     (cran-package-inputs meta repository
                                           #:download-source download-source))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]