[Rpm-metadata] Debian metadata (was Re: format misc)
Jeff Licquia
licquia at progeny.com
Mon Oct 6 18:55:25 UTC 2003
On Sat, 2003-10-04 at 02:29, seth vidal wrote:
> Hi folks,
> Take a look at this:
> http://linux.duke.edu/~skvidal/metadata/rpm-metadata2.xml
>
> tell me if it seems more workable based on the suggestions given today.
>
> I've taken some of the suggestions, others I've modified slightly - see
> if this is more appropriate.
>
> I decided on calling it <format> and then some namespace so that:
> 1. it's not rpm or deb specific
> 2. it leaves an opening for other formats
>
> I might not have put enough things inside that node, though.
>
> Please feel free to edit that file and repost it so we have an example
> to work from.
Very nice.
I've written a Debian counterpart in Python to generate v2 metadata.
The script, and some example output, is at:
http://hackers.progeny.com/~licquia/rpm-metadata/
It works off the apt cache; give it a package apt knows about, and it
will send the metadata for that package to stdout. With little
modification, it should be able to work with collections of debs or a
standard apt Packages file. It will probably only work on Debian, and
needs the python-apt package.
A few notes:
- When reading the cache, python-apt spews to stdout, so you have to
delete the first two lines of output from the program. Yech.
- The <format> namespace is obviously bogus.
- <location> doesn't have xml:base set. My utility would need to parse
sources.list and figure out which repository this came from before I
could fill that in properly. A real tool to generate this metadata
would know how to fill in the right xml:base.
- <requires> is <depends> here. This isn't me being stubborn; it's
just more consistent with <predepends>. Do we want to keep this as
<requires>, or is it OK for Debian repos to use <depends>? If we use
<requires>, does RPM have something equivalent to Debian Pre-Depends?
Pre-Requires, maybe? (Pre-Depends is like Depends, except that the
depended-upon packages must be fully installed and configured before
this package can start installation.)
- I've added Debian's additional dependency types; a full list is in
the script. I added them to the top level, not to <format>.
- For logical or, I've added a new <orentry> tag that can contain
<entry> tags. If anyone has a better idea for representing this, I'm
all ears.
- Some Debian metadata may be missing, but it should be easy to add.
More information about the Rpm-metadata
mailing list