]> git.decadent.org.uk Git - dak.git/commitdiff
Add missing stuff to make-maintainers.
authorTorsten Werner <twerner@debian.org>
Thu, 24 Mar 2011 20:35:53 +0000 (20:35 +0000)
committerTorsten Werner <twerner@debian.org>
Thu, 24 Mar 2011 20:35:53 +0000 (20:35 +0000)
Signed-off-by: Torsten Werner <twerner@debian.org>
dak/make_maintainers.py

index 4a6f0196755987b0c8435a7796a554a7596b3964..2909a3574313d1dc4e946bc9a613ff615bc4e55b 100755 (executable)
@@ -31,6 +31,16 @@ Generate Maintainers file used by e.g. the Debian Bug Tracking System
 
 ################################################################################
 
+from daklib import utils
+from daklib.config import Config
+from daklib.dbconn import *
+from daklib.regexes import re_comments
+
+import apt_pkg
+import sys
+
+################################################################################
+
 def usage (exit_code=0):
     print """Usage: dak make-maintainers [OPTION] EXTRA_FILE[...]
 Generate an index of packages <=> Maintainers / Uploaders.
@@ -90,6 +100,18 @@ def main():
             maintainers[binary.package] = binary.maintainer.name
             uploaders[binary.package] = uploader_list(binary.source)
 
+    # Process any additional Maintainer files (e.g. from pseudo
+    # packages)
+    for filename in extra_files:
+        extrafile = utils.open_file(filename)
+        for line in extrafile.readlines():
+            line = re_comments.sub('', line).strip()
+            if line == "":
+                continue
+            (package, maintainer) = line.split(None, 1)
+            maintainers[package] = maintainer
+            uploaders[package] = [maintainer]
+
     maintainer_file = open('Maintainers', 'w')
     uploader_file = open('Uploaders', 'w')
     for package in sorted(uploaders):