rpm-metadata and importing
seth vidal <skvidal-c/MNwgJ9CEH2fBVCVOL8/[email protected]> Tue, 20 Jan 2004 00:39:01 -0500
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <1074577141.3593.168.camel@binkley> |
Hi all,
I know some or all of you have seen the rpm-metadata work
(http://linux.duke.edu/metadata/) that I've been working on with most of
the other people who work on pkg mgmt tools or repositories or what not.
the programs to create the metadata are more or less complete:
http://linux.duke.edu/metadata/generate/ - download createrepo-0.3.1 or
higher and give it a run.
I'm working on code to import and handle this metadata for the client
side. Right now it works pretty well. It imports quickly and gives you
back a reasonable set of methods to operate on the metadata. Suggestions
for more methods are welcome.
I'm trying to build up a good set of utility scripts to go with the
metadata importing tools.
Right now what I've got is:
packageObject to represent each package's metadata
packageSack to represent a set of packageObjects
repoMDObject to keep track of the information about the repo
mdUtils - which is currently some catch all utility functions
- compareEVR() - just a labelCompare on steroids to catch the
cases where labelCompare can segfault
- unique() - nice function to quickly unique lists of any objects
mdErrors - exception classes for the metadata importing.
This works pretty well, there needs to be some more methods added to:
packageSack and packageObject, but overall it works nicely.
I'm thinking about putting together another module - rpmUtilities:
- a transaction set handling class - probably going to lift this from
up2date w/adrian's permission - mostly to read from the rpmdb
- a holder class for major data from the rpmdb.
- compareEVR() from above - probably this should be the canonical
location and the metadata should import it.
- class to generate list of updates
- some simple header retrieval functions from files on disk and from
the rpmdb
- rpmUtils exception classes for errors in and around the above
requirements of all of these are:
- each has a progress callback argument
- optional log and errorlog arguments
- raise a known exception range when there is a problem.
If I can do this then the major things anyone would need to do would be:
- build a transaction set
- resolve dependencies
- provide a transaction callback.
I'm starting relatively small at first - but I'd like for anyone who
might be interested to send me functions they think would be useful. If,
at the end of this, we have an rpmUtilities module that we all can use
then it's one more shared set of code that, maybe, we can rely on.
Thoughts? Am I being silly? Anyone want to help some?
-sv