[Rpm-metadata] xml - first try

Joe Shaw joe at ximian.com
Mon Sep 1 03:13:09 UTC 2003


On Sun, 2003-08-31 at 22:55, seth vidal wrote:
> First try at the xml format
> 
> Don't abuse me too much but tell me what it is missing and where I went
> horribly wrong :)

A couple things

What is the purpose of the "rpm" tag?  Is it for rpm-specific data?  If
so, then maybe the packager, vendor, buildhost, and header-ranges should
go there, as I don't think dpkgs have those elements.  Maybe group too,
since they're pretty different and arbitrary for the packaging systems.

Also, for the <requires>, <provides>, etc. tags, I'd suggest using the
same tag underneath, so we can use the same parser for processing all of
those tags in the same way.  For Red Carpet, we do something like:

<provides>
  <dep name="foo" epoch="1" version="1.0" release="1"/>
  ...
</provides>
<conflicts>
  <dep name="bar"/>
</conflicts>

And then all the <dep> tags are converted into RCPackageDep structures
and inserted into the appropriate array.

Also, how are we going to handle the encoding of things like the summary
and description?  The text in the RPM always seems to be in the
appropriate encoding for whatever language you're viewing it in, but
there's no way to know exactly what that is to convert it to UTF-8 for
serializing into XML.  For Red Carpet we just assume things are in
Latin-1 and try to convert it, but this sucks.  Should we always send
down UTF-8, or could we use something like CDATA and put it in the
native encoding and make clients deal with it?  I hope Daniel will smack
me down if that's a really hideous idea or not allowed. :)  I'd rather
everything be in UTF-8 and enforce that sort of policy on packagers, but
that might not be realistic.

Joe




More information about the Rpm-metadata mailing list