Re: [PATCH 0/3] Metadata Generator Class
Dennis Gregorovic <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2005-11-11 at 16:08 -0500, Paul Nasrat wrote: > To make life easier for those using createrepo as a library, I've > factored out a MetaDataGenerator class. > > The following three patches contain are against current HEAD (ie ontop > of the basedir patches). > > Please review for inclusion. Further patches will follow for split > media based on these patches. > > Paul Hi Paul, Thanks for the work on this. I applied the patches today and so far haven't hit any bugs. However, I am attaching a patch that moves the initialization of several cmds keys out of main and into parseArgs. This way, I can can call parseArgs and have a fully initialized set of options. -- Dennis _______________________________________________ Rpm-metadata mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/rpm-metadata
createrepo-genclass-cmds.patch
(text/x-patch, 1.2 KB)
--- genpkgmetadata.py.orig 2005-11-15 13:23:49.646929000 -0500
+++ genpkgmetadata.py 2005-11-15 13:24:09.534023000 -0500
@@ -346,6 +346,14 @@
cmds['split'] = False
cmds['file-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*', '^\/usr\/lib\/sendmail$']
cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
+ cmds['primaryfile'] = 'primary.xml.gz'
+ cmds['filelistsfile'] = 'filelists.xml.gz'
+ cmds['otherfile'] = 'other.xml.gz'
+ cmds['repomdfile'] = 'repomd.xml'
+ cmds['tempdir'] = '.repodata'
+ cmds['finaldir'] = 'repodata'
+ cmds['olddir'] = '.olddata'
+
try:
gopts, argsleft = getopt.getopt(args, 'phqVvg:s:x:u:c:', ['help', 'exclude=',
@@ -432,15 +440,6 @@
cmds, directories = parseArgs(args)
directory = directories[0]
- #setup some defaults
- cmds['primaryfile'] = 'primary.xml.gz'
- cmds['filelistsfile'] = 'filelists.xml.gz'
- cmds['otherfile'] = 'other.xml.gz'
- cmds['repomdfile'] = 'repomd.xml'
- cmds['tempdir'] = '.repodata'
- cmds['finaldir'] = 'repodata'
- cmds['olddir'] = '.olddata'
-
# start the sanity/stupidity checks
if not os.path.exists(os.path.join(cmds['basedir'], directory)):
errorprint(_('Directory must exist'))