X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue_install.py;h=d016c98638619ed9888333c6d8bf907d806a030f;hb=cac810b4aeb8fa34c8ccaa7dc35b081efddc606b;hp=b4a38b96e4488ff697745bcf86382b9ee9ce27c0;hpb=bf38dcbe75f32f221887eeda8fce0e81e64db115;p=dak.git diff --git a/daklib/queue_install.py b/daklib/queue_install.py old mode 100644 new mode 100755 index b4a38b96..d016c986 --- a/daklib/queue_install.py +++ b/daklib/queue_install.py @@ -61,7 +61,7 @@ def package_to_queue(u, summary, short_summary, queue, chg, session, announce=No u.logger.log(["Moving to %s" % queue.queue_name, u.pkg.changes_file]) u.move_to_queue(queue) - chg.in_queue = queue.queue_id + chg.in_queue_id = queue.policy_queue_id session.add(chg) session.commit() @@ -69,10 +69,9 @@ def package_to_queue(u, summary, short_summary, queue, chg, session, announce=No u.check_override() # Send accept mail, announce to lists and close bugs - if announce and not cnf["Dinstall::Options::No-Mail"]: + if announce: template = os.path.join(cnf["Dir::Templates"], announce) u.update_subst() - u.Subst["__SUITE__"] = "" mail_message = utils.TemplateSubst(u.Subst, template) utils.send_mail(mail_message) u.announce(short_summary, True) @@ -166,7 +165,7 @@ def is_autobyhand(u): def do_autobyhand(u, summary, short_summary, chg, session): print "Attempting AUTOBYHAND." - byhandleft = True + byhandleft = False for f, entry in u.pkg.files.items(): byhandfile = f @@ -188,7 +187,7 @@ def do_autobyhand(u, summary, short_summary, chg, session): if result == 0: os.unlink(byhandfile) - del entry + del u.pkg.files[f] else: print "Error processing %s, left as byhand." % (f) byhandleft = True @@ -209,7 +208,7 @@ def is_byhand(u): def do_byhand(u, summary, short_summary, chg, session): return package_to_queue(u, summary, short_summary, - get_queue('byhand'), chg, session, + get_policy_queue('byhand'), chg, session, announce=None) ################################################################################ @@ -226,20 +225,19 @@ def acknowledge_new(u, summary, short_summary, chg, session): print "Moving to NEW queue." u.logger.log(["Moving to new", u.pkg.changes_file]) - q = get_queue('new', session) + q = get_policy_queue('new', session) u.move_to_queue(q) - chg.in_queue = q.queue_id + chg.in_queue_id = q.policy_queue_id session.add(chg) session.commit() - if not cnf["Dinstall::Options::No-Mail"]: - print "Sending new ack." - template = os.path.join(cnf["Dir::Templates"], 'process-unchecked.new') - u.update_subst() - u.Subst["__SUMMARY__"] = summary - new_ack_message = utils.TemplateSubst(u.Subst, template) - utils.send_mail(new_ack_message) + print "Sending new ack." + template = os.path.join(cnf["Dir::Templates"], 'process-unchecked.new') + u.update_subst() + u.Subst["__SUMMARY__"] = summary + new_ack_message = utils.TemplateSubst(u.Subst, template) + utils.send_mail(new_ack_message) ################################################################################ @@ -256,7 +254,7 @@ def determine_target(u): # Statically handled queues target = None - for q in ["new", "autobyhand", "byhand"]: + for q in ["autobyhand", "byhand", "new"]: if QueueInfo[q]["is"](u): target = q break