Gentoo Archives: gentoo-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] metadata.dtd: Remove obsolete <natural-name/> element per GLEP 68
Date: Sun, 01 May 2016 23:28:39
Message-Id: 20160501162725.4fcbe339.dolsen@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] metadata.dtd: Remove obsolete element per GLEP 68 by "Göktürk Yüksek"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA512
3
4 On Sun, 1 May 2016 18:42:54 -0400
5 Göktürk Yüksek <gokturk@××××××××××.edu> wrote:
6
7 > -----BEGIN PGP SIGNED MESSAGE-----
8 > Hash: SHA512
9 >
10 > Michał Górny:
11 > > On Sat, 30 Apr 2016 02:36:18 -0400 Göktürk Yüksek
12 > > <gokturk@××××××××××.edu> wrote:
13 > >
14 > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
15 > >>
16 > >> Michał Górny:
17 > >>> On Thu, 28 Apr 2016 19:41:06 -0400 Göktürk Yüksek
18 > >>> <gokturk@××××××××××.edu> wrote:
19 > >>>
20 > >>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
21 > >>>>
22 > >>>> Brian Dolbec:
23 > >>>>> On Thu, 28 Apr 2016 15:39:05 -0400 Göktürk Yüksek
24 > >>>>> <gokturk@××××××××××.edu> wrote:
25 > >>>>>
26 > >>>>>> --- metadata.dtd | 5 +---- 1 file changed, 1
27 > >>>>>> insertion(+), 4 deletions(-)
28 > >>>>>>
29 > >>>>>> diff --git a/metadata.dtd b/metadata.dtd index
30 > >>>>>> 7626a57..b608852 100644 --- a/metadata.dtd +++
31 > >>>>>> b/metadata.dtd @@ -3,7 +3,7 @@ <!ATTLIST catmetadata
32 > >>>>>> pkgname CDATA "">
33 > >>>>>>
34 > >>>>>> <!-- Metadata for a package --> -<!ELEMENT pkgmetadata (
35 > >>>>>>
36 > >>>>>> (maintainer|natural-name|longdescription|slots|use|upstream)*
37 > >>>>>> )> +<!ELEMENT pkgmetadata (
38 > >>>>>> (maintainer|longdescription|slots|use|upstream)* )>
39 > >>>>>> <!ATTLIST pkgmetadata pkgname CDATA ""> <!-- One tag for
40 > >>>>>> each maintainer of a package, multiple allowed--> @@
41 > >>>>>> -13,9 +13,6 @@ explicit type) for Gentoo maintainers is
42 > >>>>>> prohibited. --> <!ATTLIST maintainer type
43 > >>>>>> (person|project|unknown) "unknown">
44 > >>>>>>
45 > >>>>>> - <!-- Natural name for package, example: LibreOffice
46 > >>>>>> (for app-office/libreoffice) --> - <!ELEMENT
47 > >>>>>> natural-name (#PCDATA)
48 > >>>>>>> - <!-- A long description of the package in freetext-->
49 > >>>>>>>
50 > >>>>>> <!ELEMENT longdescription (#PCDATA|pkg|cat)* >
51 > >>>>>
52 > >>>>> Isn't this almost obsolete? it's now xmlschema... And I
53 > >>>>> hope to have the new repoman with it out this weekend :)
54 > >>>>
55 > >>>> Does GLEP 68 explicitly declare metadata.dtd obsolete? I see
56 > >>>> that the example metadata.xml on the GLEP is missing DOCTYPE,
57 > >>>> are we getting rid of those too?
58 > >>>
59 > >>> No, and I don't know.
60 > >>>
61 > >>> metadata.dtd is still required by many tools, and as such it
62 > >>> makes sense to keep it. However, we may want to put some
63 > >>> warning that it's not very strict, and allows major structural
64 > >>> violations due to technical limitations.
65 > >>>
66 > >> After a discussion with ulm on IRC, we agreed that the following
67 > >> makes sense: "the format of the metadata is defined in GLEP 68.
68 > >> the syntax is defined in metadata.dtd. The xml-schema can be used
69 > >> for stricter validation checks." If you have no objections, I
70 > >> will update devmanual based on this description.
71 > >
72 > > What is the precise difference between 'format' and 'syntax' here?
73 > > I'm no native English speaker, and I don't see any obvious split
74 > > of responsibility between the two here, and I'm pretty sure this
75 > > will be quite confusing for other people as well.
76 > >
77 > I admit that it is hard to make a clear distinction. When I look at
78 > the GLEPs replaced by GLEP68, I see that they propose a change for
79 > metadata.xml and explain how that affects metadata.dtd. GLEP34 has
80 > "The DTD file would need to be updated to include the <catmetadata>
81 > element.", GLEP46 explicitly says "metadata.dtd should allow the use
82 > of a upstream tag in metadata.xml.", GLEP56 points to #199788 which
83 > required DTD to be patched. GLEP68 is rather vague as to how
84 > metadata.dtd is affected. It doesn't say whether it should be updated
85 > or if it has any role at all.
86 >
87 > GLEP68 provides a single human readable specification for the metadata
88 > format. In that respect, however, the DTD along with the comments in
89 > it is just as expressive, if not better: a developer can read through
90 > the DTD and learn all the information contained in the GLEP, plus the
91 > remote-id values which are not part of the specification for reasons
92 > you stated earlier. And that was the reason why I used the term
93 > "syntax": the DTD lists all the allowed elements, attributes, and
94 > values for the metadata that should be used in conformance with the
95 > GLEP .
96 >
97 > In the end, the DTD isn't much better than the GLEP as a human
98 > readable document and does a worse job than the xsd as a machine
99 > readable document for validation purposes. Once repoman switches to
100 > the xml-schema, there would be no good use for it and I don't know
101 > what should be done about the DTD. I think that until we figure it
102 > out, we should keep it in sync with the GLEP and xsd.
103
104
105 Can I trouble you and Michał to create some test ebuilds for repoman
106 that break the rules in a way that properly tests repoman code?
107
108 It'll be included in the new gen-b0rk repo which is specifically for
109 repoman test ebuilds.
110
111 I'll be sending out an email for it shortly.
112
113 - --
114 Brian Dolbec <dolsen>
115
116 -----BEGIN PGP SIGNATURE-----
117 Version: GnuPG v2.1
118
119 iQJ8BAEBCgBmBQJXJpDdXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
120 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNUQ3Qzc0RTA4MUNDNzBEQjRBNEFBRjVG
121 QkJEMDg3Mjc1ODIwRUQ4AAoJEPu9CHJ1gg7YAWgQAJ/oebwzsbbieOlEZZaONiZr
122 WPtpKY9en4Dgf2OLeLMbv3boQY71OVVJCdNbqfRHkeYPlIZLgYzoy+tWoh6lUJUS
123 91GJLVWNpm+OnD4ihc6/6YJW7SVXVv9Y6Ekm80lgWnm6EJZ5sczdvyvt3WzMciOD
124 P0bzdFPJEDaktCZzMZJrmrjWv6SHEwnNinFpBKASS/G7CpS88z1Ts87hlRdzjidE
125 Bpx+p1AVudS3WuQcqz/Tdu4QvNHRCm0ZM77XtNPVYl5ZAwAKn3rj8Nw+yZfLTjx9
126 ldv1n9k6vQoUi4kY/Icrj8FJOo7iWxm9whxh/5nUhcp8OgigsK7OiDyWaJ9+y5jP
127 AJeoMqfCjQbsmUV8pxeNv2AB0CbvJ00/m9C5aET0T7m7LwqK7N5xTMWPk3OVRHlm
128 D8BPR+XtGLPTwP4M7yD7hPkrKyjF8MsgVzzyyUwsYoW09dXwtMLOxwbr85i28kST
129 SDYS5c7lrQlzyMtckG99BVaqU6gEzEvm0jahZw/VyExk8rig8183kS7BmzJsrniN
130 DZiyeeNbw6Tq60mDm7B0CZcMjh3XlNLq+mdCozyRSFgdYYdbd2vqC0Z/7xq3qP5r
131 UmDb0vSC3eTeGqkqecChR93Dm285BQCHPKwW+cfZeLdV4VmoCEzDpXiDcloU56sy
132 Acv9vEXQjIHeF2Y42Gwm
133 =nZA4
134 -----END PGP SIGNATURE-----