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
1 On Sat, Apr 21, 2012 at 12:39:26AM +1200, Kent Fredric wrote:
2 > If you really want to support Perl Modules, ( which theres not much
3 > need for at present, looks like the team have gone through already for
4 > the most part and added remote-id's where possible already ), anything
5 > that inherits 'perl-module.eclass' has a bit of magic, in that neither
6 > SRC_URI or HOMEPAGE is required in the ebuild, and it just gets the
7 > package name from what gentoo is using. We've tried to be as close to
8 > upstream as possible for the ease of maintenance.
9
10 Actually the eclass seems to fill SRC_URI and HOMEPAGE, so when you source
11 the ebuild they are available.
12
13 > However, there are still exception cases, for instance, BioPerl has to
14 > define 'MY_PN' to tell the perl-module eclass to use a different token
15 > ( and when this is present, it should be sufficient to say that that
16 > should be the remote-id instead of the package name:
17 > see dev-perl/Moose # an example with neither src_uri or homepage
18 > see sci-biology/bioperl # an example where the package name has
19 > been forced overridden as its changed upstream
20 >
21 > But resolving module names is much trickier, its easy-ish to map a
22 > module name to a package using the service, but doing it the other way
23 > round is not so straight forward, as one package can have many
24 > modules, and its common in perl to state dependencies in terms of the
25 > module to require, not the package its in, but there's also often a
26 > defacto "main module".
27 >
28 > But I'm myself still working out how to best do that with the service
29 > , so auto-populating a "cpan-module" identifier can be left to later,
30 > its just something I considered "useful" to have metadata wise because
31 > that value is more useful to users.
32
33 Yeah, not very important, but seems to work with this patch:
34 https://github.com/iksaif/portage-janitor/commit/972aff94744741e34e99f917337430d245883c48
35
36 Example:
37 $ python remoteids.py --diff WWW-Bugzilla Moose bioperl
38 --- a/dev-perl/WWW-Bugzilla/metadata.xml
39 +++ b/dev-perl/WWW-Bugzilla/metadata.xml
40 @@ -3,6 +3,7 @@
41 <pkgmetadata>
42 <herd>perl</herd>
43 <upstream>
44 + <remote-id type="cpan-module">WWW::Bugzilla</remote-id>
45 <remote-id type="cpan">WWW-Bugzilla</remote-id>
46 </upstream>
47 </pkgmetadata>
48 --- a/dev-perl/Moose/metadata.xml
49 +++ b/dev-perl/Moose/metadata.xml
50 @@ -3,6 +3,7 @@
51 <pkgmetadata>
52 <herd>perl</herd>
53 <upstream>
54 + <remote-id type="cpan-module">Moose</remote-id>
55 <remote-id type="cpan">Moose</remote-id>
56 </upstream>
57 </pkgmetadata>
58 --- a/sci-biology/bioperl/metadata.xml
59 +++ b/sci-biology/bioperl/metadata.xml
60 @@ -8,6 +8,7 @@
61 <flag name="db">Install sci-biology/bioperl-run</flag>
62 </use>
63 <upstream>
64 + <remote-id type="cpan-module">BioPerl</remote-id>
65 <remote-id type="cpan">BioPerl</remote-id>
66 </upstream>
67 </pkgmetadata>
68
69 --
70 Corentin Chary
71 http://xf.iksaif.net/

Replies

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