Gentoo Archives: gentoo-dev

From: Corentin Chary <corentin.chary@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Add new remote-id types in metadata.dtd
Date: Fri, 20 Apr 2012 13:35:15
Message-Id: 20120420133409.GE24273@falgoret
In Reply to: Re: [gentoo-dev] RFC: Add new remote-id types in metadata.dtd by Kent Fredric
On Sat, Apr 21, 2012 at 12:39:26AM +1200, Kent Fredric wrote:
> If you really want to support Perl Modules, ( which theres not much > need for at present, looks like the team have gone through already for > the most part and added remote-id's where possible already ), anything > that inherits 'perl-module.eclass' has a bit of magic, in that neither > SRC_URI or HOMEPAGE is required in the ebuild, and it just gets the > package name from what gentoo is using. We've tried to be as close to > upstream as possible for the ease of maintenance.
Actually the eclass seems to fill SRC_URI and HOMEPAGE, so when you source the ebuild they are available.
> However, there are still exception cases, for instance, BioPerl has to > define 'MY_PN' to tell the perl-module eclass to use a different token > ( and when this is present, it should be sufficient to say that that > should be the remote-id instead of the package name: > see dev-perl/Moose # an example with neither src_uri or homepage > see sci-biology/bioperl # an example where the package name has > been forced overridden as its changed upstream > > But resolving module names is much trickier, its easy-ish to map a > module name to a package using the service, but doing it the other way > round is not so straight forward, as one package can have many > modules, and its common in perl to state dependencies in terms of the > module to require, not the package its in, but there's also often a > defacto "main module". > > But I'm myself still working out how to best do that with the service > , so auto-populating a "cpan-module" identifier can be left to later, > its just something I considered "useful" to have metadata wise because > that value is more useful to users.
Yeah, not very important, but seems to work with this patch: Example: $ python --diff WWW-Bugzilla Moose bioperl --- a/dev-perl/WWW-Bugzilla/metadata.xml +++ b/dev-perl/WWW-Bugzilla/metadata.xml @@ -3,6 +3,7 @@ <pkgmetadata> <herd>perl</herd> <upstream> + <remote-id type="cpan-module">WWW::Bugzilla</remote-id> <remote-id type="cpan">WWW-Bugzilla</remote-id> </upstream> </pkgmetadata> --- a/dev-perl/Moose/metadata.xml +++ b/dev-perl/Moose/metadata.xml @@ -3,6 +3,7 @@ <pkgmetadata> <herd>perl</herd> <upstream> + <remote-id type="cpan-module">Moose</remote-id> <remote-id type="cpan">Moose</remote-id> </upstream> </pkgmetadata> --- a/sci-biology/bioperl/metadata.xml +++ b/sci-biology/bioperl/metadata.xml @@ -8,6 +8,7 @@ <flag name="db">Install sci-biology/bioperl-run</flag> </use> <upstream> + <remote-id type="cpan-module">BioPerl</remote-id> <remote-id type="cpan">BioPerl</remote-id> </upstream> </pkgmetadata> -- Corentin Chary


Subject Author
Re: [gentoo-dev] RFC: Add new remote-id types in metadata.dtd Kent Fredric <kentfredric@×××××.com>