new createrepo api
seth vidal <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <1201063801.6218.68.camel@cutter> |
Part of all the changes in createrepo was to enable a simpler api to be used by calling python programs rather than just invoking createrepo on the commandline. The api is pretty straightforward. I'll give a simple introduction: import createrepo mdconf = createrepo.MetaDataConfig() mdconf.database = True # make the sqlite databases mdconf.directory = '/home/skvidal/tmp/f' # directory to run on md = createrepo.MetaDataGenerator(config_obj=mdconf) md.doPkgMetadata() md.doRepoMetadata() md.doFinalMove() That's really it. It's not complicated but it gives a good starting point for people to do custom population of their repodata. I dunno if there's a lot of use for this but it needed to be done anyway, if only to clean up the code. Thanks, -sv