Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: "Göktürk Yüksek" <gokturk@××××××××××.edu>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] metadata.dtd: Remove obsolete <natural-name/> element per GLEP 68
Date: Fri, 29 Apr 2016 12:58:40
Message-Id: 20160429145753.3b43a1b9.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] metadata.dtd: Remove obsolete element per GLEP 68 by "Göktürk Yüksek"
1 On Thu, 28 Apr 2016 19:41:06 -0400
2 Göktürk Yüksek <gokturk@××××××××××.edu> wrote:
3
4 > -----BEGIN PGP SIGNED MESSAGE-----
5 > Hash: SHA512
6 >
7 > Brian Dolbec:
8 > > On Thu, 28 Apr 2016 15:39:05 -0400 Göktürk Yüksek
9 > > <gokturk@××××××××××.edu> wrote:
10 > >
11 > >> --- metadata.dtd | 5 +---- 1 file changed, 1 insertion(+), 4
12 > >> deletions(-)
13 > >>
14 > >> diff --git a/metadata.dtd b/metadata.dtd index 7626a57..b608852
15 > >> 100644 --- a/metadata.dtd +++ b/metadata.dtd @@ -3,7 +3,7 @@
16 > >> <!ATTLIST catmetadata pkgname CDATA "">
17 > >>
18 > >> <!-- Metadata for a package --> -<!ELEMENT pkgmetadata (
19 > >> (maintainer|natural-name|longdescription|slots|use|upstream)* )>
20 > >> +<!ELEMENT pkgmetadata (
21 > >> (maintainer|longdescription|slots|use|upstream)* )> <!ATTLIST
22 > >> pkgmetadata pkgname CDATA ""> <!-- One tag for each maintainer of
23 > >> a package, multiple allowed--> @@ -13,9 +13,6 @@ explicit type)
24 > >> for Gentoo maintainers is prohibited. --> <!ATTLIST maintainer
25 > >> type (person|project|unknown) "unknown">
26 > >>
27 > >> - <!-- Natural name for package, example: LibreOffice (for
28 > >> app-office/libreoffice) --> - <!ELEMENT natural-name (#PCDATA)
29 > >> > - <!-- A long description of the package in freetext-->
30 > >> <!ELEMENT longdescription (#PCDATA|pkg|cat)* >
31 > >
32 > > Isn't this almost obsolete? it's now xmlschema... And I hope to
33 > > have the new repoman with it out this weekend :)
34 >
35 > Does GLEP 68 explicitly declare metadata.dtd obsolete? I see that the
36 > example metadata.xml on the GLEP is missing DOCTYPE, are we getting
37 > rid of those too?
38
39 No, and I don't know.
40
41 metadata.dtd is still required by many tools, and as such it makes
42 sense to keep it. However, we may want to put some warning that it's
43 not very strict, and allows major structural violations due to
44 technical limitations.
45
46 As for DOCTYPE, there was no formal decision on that. It's not
47 technically required, so the GLEP doesn't enforce it. However, I don't
48 expect it being gone anytime soon. One of the reasons behind it is that
49 repoman enforces it as part of metadata.xml validation. If it is to be
50 gone, stable repoman needs to accept it missing at least for some time.
51
52 There was a proposal to link new/additional schemas in metadata.xml
53 files. However, I personally don't think we should go this way. DOCTYPE
54 already proved troublesome (when we switched to https),
55 and maintaining any kind of schema reference in XML files doesn't give
56 us any real benefit (we don't enforce any hard defaults besides
57 languages there, and I don't think many XML parsers would respect that
58 anyway).
59
60 > I understand that the DTD is more like a super-set, so anything that
61 > complies with GLEP 68 will comply with the DTD as well. However, there
62 > is a caveat here: for example the GLEP dismisses the list of possible
63 > values for <remote-id/> by saying "The list of available trackers and
64 > their specific identifiers are outside scope of this specification."
65 > but does not mention where these values shall be kept either. The
66 > moment we add a new remote-id, the xmlschema diverges from the DTD and
67 > stops being a subset.
68
69 Well, there is good reason for not hardcoding the list in the GLEP,
70 and this obviously is to avoid updating the GLEP for every single
71 change. And yes, as you can see, I didn't point out a specific location
72 where remote-ids are to be defined to avoid problems like the one noted
73 below.
74
75 As I see it, we can defer it to some project / wiki page, or simply
76 keep it in either of the schemas. Either way, we should keep both
77 schemas reasonably up-to-date.
78
79 > Besides, the PMS says the format of metadata.xml is described in DTD.
80 > Even if we move to something else, doesn't metadata.dtd need to be
81 > kept around until the PMS is amended?
82
83 The key point PMS is making is 'outside the scope'. The specific
84 location is just a minor problem, and it should be updated. I'll take
85 a look at it.
86
87 Oh, and +1 for the patch. If nobody complains and nobody beats me up to
88 it, I'll commit it this weekend.
89
90 --
91 Best regards,
92 Michał Górny
93 <http://dev.gentoo.org/~mgorny/>

Replies

Subject Author
Re: [gentoo-dev] [PATCH] metadata.dtd: Remove obsolete <natural-name/> element per GLEP 68 "Göktürk Yüksek" <gokturk@××××××××××.edu>