unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: package updater: operate on package structs, not names?
Date: Tue, 1 Dec 2015 13:43:45 +0100	[thread overview]
Message-ID: <idj610i9w5a.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <idja8pua1t6.fsf@bimsb-sys02.mdc-berlin.net>


Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> Hi Guix,
>
> I noticed a flaw in the CRAN updater.  The ‘latest-release’ procedure is
> called with the result of ‘(package-name package)’.  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 —> r-genomic-ranges
>     data.table    —> r-data-table
>     formatR       –> r-formatr
>     DBI           —> r-dbi
>
> When we only pass the Guix name to ‘latest-release’, the updater won’t
> know how to find the package and its upstream version because the names
> don’t 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 ‘latest-release’.  The latter approach 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
> ‘latest-release’.  Those updaters that only need the package name can
> just reduce it by calling ‘(package-name package)’ themselves.
>
> 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
‘guix/import/pypi.scm’ does this already.  Since we start out with a
package object wouldn’t it be better to just keep it rather than convert
back and forth between names and packages?

~~ Ricardo

  reply	other threads:[~2015-12-01 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 10:41 package updater: operate on package structs, not names? Ricardo Wurmus
2015-12-01 12:43 ` Ricardo Wurmus [this message]
2015-12-01 17:36 ` Andreas Enge
2015-12-02  8:00 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idj610i9w5a.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).