guix-patches
[Top][All Lists]
Advanced

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

[bug#53818] [PATCH v2 5/7] import: Add 'repology' updater.


From: Xinglu Chen
Subject: [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater.
Date: Wed, 09 Feb 2022 13:54:27 +0100

Maxime schrieb am Dienstag der 08. Februar 2022 um 13:49 +01:

> Xinglu Chen schreef op di 08-02-2022 om 13:29 [+0100]:
>> > Xinglu Chen schreef op ma 07-02-2022 om 10:07 [+0100]:
>> > > +(define (latest-release package)
>> > > +  (mock ((guix import json) json-fetch
>> > > +         (lambda* (url #:key cached?)
>> > > +           (json-string->scm %test-json)))
>> > > +        (repology-latest-release package)))
>> > 
>> > It would be nice to verify the URL.
>> 
>> What do you mean with “verify”
>
> Something along the lines of:
>
> (lambda* (url #:key cached?)
>   (if (equal? url
> "http://[hostname]/release/information/of/PACKAGE.json";)
>     (json-string->scm ...)
>     (error "the refresher contacted the wrong URL!")))

Ah, OK, thanks for clarifying!

Attachment: signature.asc
Description: PGP signature


reply via email to

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