]> git.decadent.org.uk Git - dak.git/commitdiff
[PATCH] Add option to make-maintainers to only output source packages
authorMatthias Klumpp <mak@debian.org>
Tue, 26 Mar 2013 22:31:16 +0000 (23:31 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 10 Sep 2015 20:24:46 +0000 (22:24 +0200)
This is used in Tanglu to feed it's BTS

dak/make_maintainers.py

index 30606e9a429a1fee4fbfb45776a42455895a7309..4c7d3c9d1c17971b9450f17f6fc3b86d457e00df 100755 (executable)
@@ -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