From 8f193531f8c57b571f5c75ec1f1110b7e40b8d09 Mon Sep 17 00:00:00 2001 From: Anders F Bjorklund Date: Thu, 18 Aug 2011 18:22:53 +0200 Subject: [PATCH 06/12] also add --changelog-limit option --- genpkgmetadata.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/genpkgmetadata.py b/genpkgmetadata.py index 48dcb5c..8885ddc 100755 --- a/genpkgmetadata.py +++ b/genpkgmetadata.py @@ -63,6 +63,7 @@ def usage(retval=1): -h, --help = show this help -V, --version = output version -p, --pretty = output xml files in pretty format. + --changelog-limit = only import the last N changelog entries --update = update existing metadata (if present) -d, --database = generate the sqlite databases. --skip-stat = skip the stat() call on a --update, assumes if the name @@ -447,6 +448,7 @@ def parseArgs(args): gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', ['help', 'exclude=', 'quiet', 'verbose', 'cachedir=', 'basedir=', 'baseurl=', 'groupfile=', 'checksum=', + 'changelog-limit=', 'version', 'pretty', 'split', 'outputdir=', 'noepoch', 'checkts', 'database', 'update', 'skip-symlinks', 'pkglist=', @@ -505,6 +507,8 @@ def parseArgs(args): # cmds['updategroupsonly'] = 1 elif arg in ['-s', '--checksum']: errorprint(_('This option is deprecated')) + elif arg == '--changelog-limit': + cmds['changelog_limit'] = int(a) elif arg in ['-c', '--cachedir']: cmds['cache'] = True cmds['cachedir'] = a -- 1.7.3.1