GNU bug report logs - #26373
Various improvements to the CRAN importer

Previous Next

Package: guix-patches;

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

Date: Wed, 5 Apr 2017 16:41:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 26373 <at> debbugs.gnu.org
Subject: bug#26373: [PATCH 6/6] import cran: Skip updating when meta data cannot be downloaded.
Date: Mon, 10 Apr 2017 23:37:29 +0200
Ricardo Wurmus <rekado <at> elephly.net> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Ricardo Wurmus <rekado <at> 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”.

What was the exception?

I think a good approach is to catch precisely the kind of error that we
don’t want to see.  ‘false-if-exception’ catches everything and could
thus hide genuine errors/bugs (including unbound variables and similar),
which sounds undesirable.

WDYT?

Ludo’.




This bug report was last modified 8 years and 65 days ago.

Previous Next


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