Re: createrepo future
seth vidal <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <1186606289.712.64.camel@cutter> |
On Wed, 2007-08-08 at 14:51 -0400, seth vidal wrote:
> 3. the new code base. Nothing is written up all that well, but we do
> have a need for a createrepo that's more usable as a module than as a
> executable program. Specifically, we need module code to return the
> metadata from any given package so it can then be crammed into a db or
> any number of arbitrary formats. It would also be nice to do work on the
> other side of the repodata. So we could easily take 2 repositories and
> produce differences, unions or intersections of them. There's a lot of
> work and not a lot of specification for this but it does need to happen.
> I figure the only way it will happen is with an almost ground-up
> rewrite, actually. so that is what the 'master' branch on git is for.
Some rough ideas:
PackageObject - looks a lot like a YumLocalPackage() object from yum
PrimaryObject - holder class for any data to be added to the primary
metadata
for the repository
FileListObject - ditto above for filelists
OtherObject - changelog info in other metadata
CollectorObject - module over the above 3 which takes PackageObjects to
put into the Primary/FileList/Other objects. It needs to be able to
incrementally write to keep this from exploding in memory size.
RepoMDObject - repomd.xml creator/handler - takes CollectorObjects to
generate repomd.xml
I know this is object-riffic but it's what I was thinking about while
getting tomatoes at the farmer's market and those are little discrete
objects. Then I put them all in a bag and I can pass them around to
whomever and they have all of those objects. I can take any one out, put
it into another bag and collect them in different ways. Tomatoes are
packages and we should be able to add/remove any arbitrary tomato from a
repository and not disturb the other items in the bag.
Sorry, odd analogy but...
-sv