Exposing split media

Paul Nasrat <[email protected]>
Newsgroups gmane.linux.rpm.metadata
Organization Red Hat, Inc.
Message-ID <[email protected]>
I'd like to propose a standard, optional extension to the rpm metadata
for handling split media, it serves as a hint to the metadata parser in
order to determine location:

<?xml version="1.0" encoding="UTF-8"?>
<mediaset xmlns="http://linux.duke.edu/metadata/mediaset" volumes="4"
packages="2">
<package pkgid="56f1eaac679ce0e42f371b8c82476f784878011f" name="setup"
arch="noarch">
   <version epoch="0" ver="2.5.47" rel="1.1" />
   <mediaindex volume="1" />
</package>
...
<package pkgid="995dbf65a45ac6f31c5f165789ce4262476f888b"
name="nasm-rdoff" arch="i386">
   <version epoch="0" ver="0.98.39" rel="3" />
   <mediaindex volume="4" />
</package>
</mediaset>

A simple parser based on mdparser in yum would be adding the handler:

 '{http://linux.duke.edu/metadata/mediaset}mediaset': MediaSetEntry

class MediaSetEntry(BaseEntry):
    def __init__(self, elem):
        BaseEntry.__init__(self, elem)
        self._p['pkgId'] = elem.attrib['pkgid']
        self._p['volume']= None
        for child in elem:
            name = self._bn(child.tag)
            if name == 'mediaindex':
                volume = child.get('volume', 'mediaindex')
                self._p['volume'] = volume
        elem.clear()

Views?

Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.