From 05e18ac43110d59a8a0bac7076b6a3690d639321 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Tue, 26 Mar 2013 23:31:16 +0100 Subject: [PATCH] [PATCH] Add option to make-maintainers to only output source packages This is used in Tanglu to feed it's BTS --- dak/make_maintainers.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/dak/make_maintainers.py b/dak/make_maintainers.py index 30606e9a..4c7d3c9d 100755 --- a/dak/make_maintainers.py +++ b/dak/make_maintainers.py @@ -47,6 +47,7 @@ def usage (exit_code=0): Generate an index of packages <=> Maintainers / Uploaders. -a, --archive=ARCHIVE archive to take packages from + -s, --source output source packages only -h, --help show this help and exit """ sys.exit(exit_code) @@ -69,9 +70,11 @@ def main(): cnf = Config() Arguments = [('h',"help","Make-Maintainers::Options::Help"), - ('a','archive','Make-Maintainers::Options::Archive','HasArg')] - if not cnf.has_key("Make-Maintainers::Options::Help"): - cnf["Make-Maintainers::Options::Help"] = "" + ('a',"archive","Make-Maintainers::Options::Archive",'HasArg'), + ('s',"source","Make-Maintainers::Options::Source")] + for i in ["Help", "Source" ]: + if not cnf.has_key("Make-Maintainers::Options::%s" % (i)): + cnf["Make-Maintainers::Options::%s" % (i)] = "" extra_files = apt_pkg.parse_commandline(cnf.Cnf, Arguments, sys.argv) Options = cnf.subtree("Make-Maintainers::Options") @@ -110,11 +113,12 @@ def main(): maintainers[source.source] = source.maintainer.name uploaders[source.source] = uploader_list(source) - Logger.log(['binaries']) - for binary in binary_query: - if binary.package not in maintainers: - maintainers[binary.package] = binary.maintainer.name - uploaders[binary.package] = uploader_list(binary.source) + if not Options["Source"]: + Logger.log(['binaries']) + for binary in binary_query: + if binary.package not in maintainers: + maintainers[binary.package] = binary.maintainer.name + uploaders[binary.package] = uploader_list(binary.source) Logger.log(['files']) # Process any additional Maintainer files (e.g. from pseudo -- 2.39.5