[Rpm-metadata] Debian metadata (was Re: format misc)
Jeff Licquia
licquia at progeny.com
Tue Oct 7 21:19:25 UTC 2003
On Tue, 2003-10-07 at 16:07, Darrin Thompson wrote:
> You'd have to think carefully about how you structure it. This probably
> wouldn't work:
>
> <depends>
> <deb:orentry>
> <entry name="blah"/>
> <entry name="second-alternative"/>
> <deb:orentry>
> </depends>
>
> If a client who doesn't understand the debian namespace ignores orentry
> then they either have two entries or none at all. It depends on how you
> define "ignore".
>
> Personally I like defining ignore as "ignore the attribute or element
> and all the element's children."
Very good point.
> Perhaps a better solution would be:
>
> <depends>
> <entry name="blah"/>
> <deb:orentry>
> <entry name="second-alternative"/>
> </deb:orentry>
> </depends>
Ick. I hate imbibing context with semantic meaning.
I'd probably implement it something like this:
<depends>
<entry name="alt1">
<deb:altentry name="alt2" flag="GE">
<version ver="1.0"/>
</deb:altentry>
<deb:altentry name="alt3"/>
</entry>
</depends>
That's still a bit ugly, but it would seem to failsafe under nearly all
the parsing situations I can think of. If a parser didn't drop subnodes
of unrecognized nodes, then the <version> tag would cause problems, but
that could even be solved with an <altversion> tag in the namespace or
some such.
More information about the Rpm-metadata
mailing list