[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master 5/7] Re-enable BXA notifications



Signed-off-by: Frank Lichtenheld <djpig@debian.org>
---
 dak/process_new.py |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dak/process_new.py b/dak/process_new.py
index d73ca35..b8e09c6 100755
--- a/dak/process_new.py
+++ b/dak/process_new.py
@@ -531,18 +531,18 @@ def check_pkg (upload):
 
 ## FIXME: horribly Debian specific
 
-# def do_bxa_notification():
-#     files = Upload.pkg.files
-#     summary = ""
-#     for f in files.keys():
-#         if files[f]["type"] == "deb":
-#             control = apt_pkg.ParseSection(apt_inst.debExtractControl(utils.open_file(f)))
-#             summary += "\n"
-#             summary += "Package: %s\n" % (control.Find("Package"))
-#             summary += "Description: %s\n" % (control.Find("Description"))
-#     Upload.Subst["__BINARY_DESCRIPTIONS__"] = summary
-#     bxa_mail = utils.TemplateSubst(Upload.Subst,Cnf["Dir::Templates"]+"/process-new.bxa_notification")
-#     utils.send_mail(bxa_mail)
+def do_bxa_notification():
+    files = upload.pkg.files
+    summary = ""
+    for f in files.keys():
+        if files[f]["type"] == "deb":
+            control = apt_pkg.ParseSection(apt_inst.debExtractControl(utils.open_file(f)))
+            summary += "\n"
+            summary += "Package: %s\n" % (control.Find("Package"))
+            summary += "Description: %s\n" % (control.Find("Description"))
+    upload.Subst["__BINARY_DESCRIPTIONS__"] = summary
+    bxa_mail = utils.TemplateSubst(upload.Subst,Config()["Dir::Templates"]+"/process-new.bxa_notification")
+    utils.send_mail(bxa_mail)
 
 ################################################################################
 
@@ -568,8 +568,8 @@ def add_overrides (new, upload, session):
 
     session.commit()
 
-#     if Cnf.FindB("Dinstall::BXANotify"):
-#         do_bxa_notification()
+    if Config().FindB("Dinstall::BXANotify"):
+        do_bxa_notification(upload)
 
 ################################################################################
 
-- 
1.6.3.3



Reply to: