From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 07/12] import: crate: Add crate updater. Date: Mon, 26 Sep 2016 12:09:42 +0200 Message-ID: <87y42fkm55.fsf@gnu.org> References: <20160922131903.1606-1-david@craven.ch> <20160922131903.1606-7-david@craven.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYAo-0003Ql-DF for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boYAk-0004xa-BR for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:30 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:25116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYAk-0004wr-4p for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:26 -0400 In-Reply-To: <20160922131903.1606-7-david@craven.ch> (David Craven's message of "Thu, 22 Sep 2016 15:18:58 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel@gnu.org David Craven skribis: > * guix/import/crate.scm (crate-package?, latest-release, > %crate-updater): New variables. > * guix/scripts/refresh.scm (%updaters): Add %crate-updater to list of > updaters. > * guix/upstream.scm (package-update): Use a url from the list when the > find2 procedure doesn't find a url sig-url pair. Neat! > +(define (latest-release package) > + "Return an for the latest release of PACKAGE." > + (let* ((crate-name (guix-package->crate-name package)) > + (metadata (crate-fetch crate-name)) > + (version (assoc-ref* metadata "crate" "max_version")) > + (url (crate-uri crate-name version))) > + (upstream-source > + (package (package-name package)) > + (version version) > + (urls (list url))))) So they don=E2=80=99t publish OpenPGP signatures? :-/ > --- a/guix/upstream.scm > +++ b/guix/upstream.scm > @@ -194,7 +194,7 @@ and 'interactive' (default)." > (string-suffix? archive-type url)) > urls > (or signature-urls (circular-list #f))))) > - (let ((tarball (download-tarball store url signature-url > + (let ((tarball (download-tarball store (if url url (car urls)) si= gnature-url I don=E2=80=99t understand this part, and I suspect it could lead to inconsistent results where the signature URL doesn=E2=80=99t match the sour= ce URL. Do you have an example of the problem you experienced? Since the problem is probably not specific to Crates, we should probably address it in a separate patch. Otherwise LGTM! Thanks, Ludo=E2=80=99.