unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 26373@debbugs.gnu.org
Subject: bug#26373: [PATCH 6/6] import cran: Skip updating when meta data cannot be downloaded.
Date: Mon, 10 Apr 2017 15:55:29 +0200	[thread overview]
Message-ID: <87k26s1i5q.fsf@elephly.net> (raw)
In-Reply-To: <87efx0egd6.fsf@gnu.org>


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> * gnu/packages/bioinformatics.scm (latest-cran-release,
>> latest-bioconductor-release): Abort early when meta data cannot be downloaded.
>> ---
>>  guix/import/cran.scm | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/guix/import/cran.scm b/guix/import/cran.scm
>> index 557d694ad..fc7a1ed84 100644
>> --- a/guix/import/cran.scm
>> +++ b/guix/import/cran.scm
>> @@ -398,7 +398,8 @@ dependencies."
>>      (package->upstream-name package))
>>
>>    (define meta
>> -    (fetch-description 'cran upstream-name))
>> +    (false-if-exception
>> +     (fetch-description 'cran upstream-name)))
>
> I would prefer catching only the relevant exception.  So I suppose
> something like:
>
>   (guard (c ((http-get-error? c)
>              (if (= 404 (http-get-error-code c))
>                  #f
>                  (raise c))))
>     (fetch-description 'cran upstream-name))
>
> However I see that ‘fetch-description’ already does that, so what
> exceptions are we protecting against?

I don’t know what the desired behaviour here is.  When updating
packages, I think it’s good to keep going.  If there’s an error
downloading the package meta data I want “meta” to be “#f”, which leads
to skipping the update.

Without turning errors to “#f” I wasn’t able to just update all packages
with “guix refresh -t cran,bioconductor -u”.  That said, I don’t like
this.  I feel that it would be better to add a “--keep-going” option for
“refresh” and implement it in the shared updater code rather than here.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  reply	other threads:[~2017-04-10 13:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05 16:40 bug#26373: Various improvements to the CRAN importer Ricardo Wurmus
2017-04-05 16:42 ` bug#26373: [PATCH 1/6] import cran: Exclude experiment packages in predicate "bioconductor-package?" Ricardo Wurmus
2017-04-05 16:42   ` bug#26373: [PATCH 2/6] import cran: Add predicate for Bioconductor experiment packages Ricardo Wurmus
2017-04-10  9:51     ` Ludovic Courtès
2017-04-10 13:50       ` Ricardo Wurmus
2017-04-10 21:34         ` Ludovic Courtès
2017-04-05 16:42   ` bug#26373: [PATCH 3/6] import cran: Refactor "needs-zlib?" Ricardo Wurmus
2017-04-10  9:52     ` Ludovic Courtès
2017-04-05 16:42   ` bug#26373: [PATCH 4/6] import cran: Check if pkg-config is needed Ricardo Wurmus
2017-04-10  9:52     ` Ludovic Courtès
2017-04-05 16:42   ` bug#26373: [PATCH 5/6] import cran: Ensure substring indices are valid Ricardo Wurmus
2017-04-10  9:52     ` Ludovic Courtès
2017-04-05 16:42   ` bug#26373: [PATCH 6/6] import cran: Skip updating when meta data cannot be downloaded Ricardo Wurmus
2017-04-10  9:55     ` Ludovic Courtès
2017-04-10 13:55       ` Ricardo Wurmus [this message]
2017-04-10 21:37         ` Ludovic Courtès
2017-05-16 19:48           ` Ricardo Wurmus
2017-04-10  9:50   ` bug#26373: [PATCH 1/6] import cran: Exclude experiment packages in predicate "bioconductor-package?" 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=87k26s1i5q.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=26373@debbugs.gnu.org \
    --cc=ludo@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).