Ricardo Wurmus <[email protected]> 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 via email to