From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: package updater: operate on package structs, not names? Date: Tue, 1 Dec 2015 11:41:25 +0100 Message-ID: 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]:33725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3iPi-0006xF-HS for guix-devel@gnu.org; Tue, 01 Dec 2015 05:44:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3iPe-0001Sq-H9 for guix-devel@gnu.org; Tue, 01 Dec 2015 05:44:02 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:56258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3iPe-0001Sh-6z for guix-devel@gnu.org; Tue, 01 Dec 2015 05:43:58 -0500 Received: from localhost (localhost [127.0.0.1]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 5C10B380A06 for ; Tue, 1 Dec 2015 11:43:56 +0100 (CET) Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FUAYvbO3492B for ; Tue, 1 Dec 2015 11:43:49 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 1 Dec 2015 11:43:49 +0100 (CET) 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" 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. The = 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, the = 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 to closely match those of the upstream packages, or we pass the complete package structure to =E2=80=98latest-release=E2=80=99. The latter approa= ch 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 pack= age name can just reduce it by calling =E2=80=98(package-name package)=E2=80=99 themse= lves. What do you think? ~~ Ricardo