From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: package updater: operate on package structs, not names? Date: Tue, 1 Dec 2015 13:43:45 +0100 Message-ID: References: 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]:41014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kKJ-0007q2-Kv for guix-devel@gnu.org; Tue, 01 Dec 2015 07:46:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3kKG-00079h-Bt for guix-devel@gnu.org; Tue, 01 Dec 2015 07:46:35 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:58345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3kKG-00079X-2v for guix-devel@gnu.org; Tue, 01 Dec 2015 07:46:32 -0500 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 96A24380788 for ; Tue, 1 Dec 2015 13:46:30 +0100 (CET) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DHIcdFsHQxqo for ; Tue, 1 Dec 2015 13:46:24 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 1 Dec 2015 13:46:24 +0100 (CET) In-Reply-To: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" Ricardo Wurmus writes: > Hi Guix, > > I noticed a flaw in the CRAN updater. The =E2=80=98latest-release=E2=80= =99 procedure is > called with the result of =E2=80=98(package-name package)=E2=80=99. Th= e problem here is > that Guix package names follow much stricter naming rules than the > upstream packages. > > Here are a couple of examples of R package names and their related Guix > package names: > > GenomicRanges =E2=80=94> r-genomic-ranges > data.table =E2=80=94> r-data-table > formatR =E2=80=93> r-formatr > DBI =E2=80=94> r-dbi > > When we only pass the Guix name to =E2=80=98latest-release=E2=80=99, th= e updater won=E2=80=99t > know how to find the package and its upstream version because the names > don=E2=80=99t match. > > There are two ways to approach this: we change the Guix package names t= o > closely match those of the upstream packages, or we pass the complete > package structure to =E2=80=98latest-release=E2=80=99. The latter appr= oach would allow > the CRAN updater to extract the appropriate name from the tarball URI. > > We have the same problem for Ruby gems, I think, so I think that it > generally would be a good idea to pass the whole package object to > =E2=80=98latest-release=E2=80=99. Those updaters that only need the pa= ckage name can > just reduce it by calling =E2=80=98(package-name package)=E2=80=99 them= selves. > > What do you think? It just occurred to me that I could do something like this: (specification->package the-package-name) and then operate on the package. Then I noticed that =E2=80=98guix/import/pypi.scm=E2=80=99 does this already. Since we start= out with a package object wouldn=E2=80=99t it be better to just keep it rather than = convert back and forth between names and packages? ~~ Ricardo