GNU bug report logs -
#26369
[PATCH] import cran: Fetch DESCRIPTION files from Github mirror.
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Wed, 5 Apr 2017 13:38:01 UTC
Severity: normal
Tags: patch
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 26369 in the body.
You can then email your comments to 26369 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#26369
; Package
guix-patches
.
(Wed, 05 Apr 2017 13:38: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
guix-patches <at> gnu.org
.
(Wed, 05 Apr 2017 13:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* guix/import/cran.scm (%bioconductor-svn-url): Remove variable.
(bioconductor-mirror-url): New procedure.
(fetch-description): Take a REPOSITORY symbol instead of a BASE-URL string.
(cran->guix-package): Pass REPOSITORY symbol to "fetch-description".
(latest-cran-release, latest-bioconductor-release): Adjust accordingly.
(bioconductor-package?): Update comment about SVN.
---
guix/import/cran.scm | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/guix/import/cran.scm b/guix/import/cran.scm
index 4d36882cf..8e24f6e17 100644
--- a/guix/import/cran.scm
+++ b/guix/import/cran.scm
@@ -124,17 +124,19 @@ package definition."
;; The latest Bioconductor release is 3.4. Bioconductor packages should be
;; updated together.
-(define %bioconductor-svn-url
- (string-append "https://readonly:readonly@"
- "hedgehog.fhcrc.org/bioconductor/branches/RELEASE_3_4/"
- "madman/Rpacks/"))
+(define (bioconductor-mirror-url name)
+ (string-append "https://raw.githubusercontent.com/Bioconductor-mirror/"
+ name "/release-3.4"))
-
-(define (fetch-description base-url name)
+(define (fetch-description repository name)
"Return an alist of the contents of the DESCRIPTION file for the R package
-NAME, or #f in case of failure. NAME is case-sensitive."
+NAME in the given REPOSITORY, or #f in case of failure. NAME is
+case-sensitive."
;; This API always returns the latest release of the module.
- (let ((url (string-append base-url name "/DESCRIPTION")))
+ (let ((url (string-append (case repository
+ ((cran) (string-append %cran-url name))
+ ((bioconductor) (bioconductor-mirror-url name)))
+ "/DESCRIPTION")))
(guard (c ((http-get-error? c)
(format (current-error-port)
"error: failed to retrieve package information \
@@ -290,11 +292,8 @@ from the alist META, which was derived from the R package's DESCRIPTION file."
(lambda* (package-name #:optional (repo 'cran))
"Fetch the metadata for PACKAGE-NAME from REPO and return the `package'
s-expression corresponding to that package, or #f on failure."
- (let* ((url (case repo
- ((cran) %cran-url)
- ((bioconductor) %bioconductor-svn-url)))
- (module-meta (fetch-description url package-name)))
- (and=> module-meta (cut description->package repo <>))))))
+ (and=> (fetch-description repo package-name)
+ (cut description->package repo <>)))))
(define* (recursive-import package-name #:optional (repo 'cran))
"Generate a stream of package expressions for PACKAGE-NAME and all its
@@ -385,7 +384,7 @@ dependencies."
(package->upstream-name package))
(define meta
- (fetch-description %cran-url upstream-name))
+ (fetch-description 'cran upstream-name))
(and meta
(let ((version (assoc-ref meta "Version")))
@@ -402,7 +401,7 @@ dependencies."
(package->upstream-name package))
(define meta
- (fetch-description %bioconductor-svn-url upstream-name))
+ (fetch-description 'bioconductor upstream-name))
(and meta
(let ((version (assoc-ref meta "Version")))
@@ -426,7 +425,10 @@ dependencies."
"Return true if PACKAGE is an R package from Bioconductor."
(let ((predicate (lambda (uri)
(and (string-prefix? "http://bioconductor.org" uri)
- ;; Data packages are not listed in SVN
+ ;; Data packages are neither listed in SVN nor on
+ ;; the Github mirror, so we have to exclude them
+ ;; from the set of bioconductor packages that can be
+ ;; updated automatically.
(not (string-contains uri "/data/annotation/"))))))
(and (string-prefix? "r-" (package-name package))
(match (and=> (package-source package) origin-uri)
--
2.12.2
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26369
; Package
guix-patches
.
(Mon, 10 Apr 2017 09:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 26369 <at> debbugs.gnu.org (full text, mbox):
Ricardo Wurmus <rekado <at> elephly.net> skribis:
> * guix/import/cran.scm (%bioconductor-svn-url): Remove variable.
> (bioconductor-mirror-url): New procedure.
> (fetch-description): Take a REPOSITORY symbol instead of a BASE-URL string.
> (cran->guix-package): Pass REPOSITORY symbol to "fetch-description".
> (latest-cran-release, latest-bioconductor-release): Adjust accordingly.
> (bioconductor-package?): Update comment about SVN.
LGTM.
Out of curiosity, what’s the rationale for using the GitHub mirror
instead of the SVN repo?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26369
; Package
guix-patches
.
(Mon, 10 Apr 2017 11:15:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 26369 <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> writes:
> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>
>> * guix/import/cran.scm (%bioconductor-svn-url): Remove variable.
>> (bioconductor-mirror-url): New procedure.
>> (fetch-description): Take a REPOSITORY symbol instead of a BASE-URL string.
>> (cran->guix-package): Pass REPOSITORY symbol to "fetch-description".
>> (latest-cran-release, latest-bioconductor-release): Adjust accordingly.
>> (bioconductor-package?): Update comment about SVN.
>
> LGTM.
>
> Out of curiosity, what’s the rationale for using the GitHub mirror
> instead of the SVN repo?
The Bioconductor people have been planning for a while to retire their
SVN repository and use the Github mirror exclusively. I heard from
Bioconductor users that this move is going to happen soon.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
Reply sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
You have taken responsibility.
(Tue, 16 May 2017 19:40:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
bug acknowledged by developer.
(Tue, 16 May 2017 19:40:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 26369-done <at> debbugs.gnu.org (full text, mbox):
Ricardo Wurmus <rekado <at> elephly.net> writes:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Ricardo Wurmus <rekado <at> elephly.net> skribis:
>>
>>> * guix/import/cran.scm (%bioconductor-svn-url): Remove variable.
>>> (bioconductor-mirror-url): New procedure.
>>> (fetch-description): Take a REPOSITORY symbol instead of a BASE-URL string.
>>> (cran->guix-package): Pass REPOSITORY symbol to "fetch-description".
>>> (latest-cran-release, latest-bioconductor-release): Adjust accordingly.
>>> (bioconductor-package?): Update comment about SVN.
>>
>> LGTM.
>>
>> Out of curiosity, what’s the rationale for using the GitHub mirror
>> instead of the SVN repo?
>
> The Bioconductor people have been planning for a while to retire their
> SVN repository and use the Github mirror exclusively. I heard from
> Bioconductor users that this move is going to happen soon.
Pushed to master.
--
Ricardo
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 14 Jun 2017 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 85 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.