]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Use more https://
[dak.git] / daklib / queue.py
index e81614c3e742e89a2b1b8c6538e8f65a712bcbe5..b869e04fa3fa952f59180b1df2125b3d991554bf 100644 (file)
@@ -41,8 +41,6 @@ from types import *
 from sqlalchemy.sql.expression import desc
 from sqlalchemy.orm.exc import NoResultFound
 
-import yaml
-
 from dak_exceptions import *
 from changes import *
 from regexes import *
@@ -104,12 +102,12 @@ def check_valid(overrides, session):
 def prod_maintainer(notes, upload):
     cnf = Config()
     changes = upload.changes
+    whitelists = [ upload.target_suite.mail_whitelist ]
 
     # Here we prepare an editor and get them ready to prod...
     (fd, temp_filename) = utils.temp_filename()
     temp_file = os.fdopen(fd, 'w')
-    for note in notes:
-        temp_file.write(note.comment)
+    temp_file.write("\n\n=====\n\n".join([note.comment for note in notes]))
     temp_file.close()
     editor = os.environ.get("EDITOR","vi")
     answer = 'E'
@@ -155,7 +153,7 @@ def prod_maintainer(notes, upload):
         Subst,cnf["Dir::Templates"]+"/process-new.prod")
 
     # Send the prod mail
-    utils.send_mail(prod_mail_message)
+    utils.send_mail(prod_mail_message, whitelists=whitelists)
 
     print "Sent prodding message"
 
@@ -188,6 +186,7 @@ def edit_note(note, upload, session, trainee=False):
         return 0
 
     comment = NewComment()
+    comment.policy_queue = upload.policy_queue
     comment.package = upload.changes.source
     comment.version = upload.changes.version
     comment.comment = newnote
@@ -200,7 +199,7 @@ def edit_note(note, upload, session, trainee=False):
 
 # FIXME: Should move into the database
 # suite names DMs can upload to
-dm_suites = ['unstable', 'experimental', 'squeeze-backports']
+dm_suites = ['unstable', 'experimental', 'squeeze-backports','squeeze-backports-sloppy', 'wheezy-backports']
 
 def get_newest_source(source, session):
     'returns the newest DBSource object in dm_suites'
@@ -408,7 +407,7 @@ class Upload(object):
         return sponsored
 
     def check_dm_upload(self, fpr, session):
-        # Quoth the GR (http://www.debian.org/vote/2007/vote_003):
+        # Quoth the GR (https://www.debian.org/vote/2007/vote_003):
         ## none of the uploaded packages are NEW
         ## none of the packages are being taken over from other source packages
         for b in self.pkg.changes["binary"].keys():