[PATCH] Include distribution name in ACCEPTED and INSTALLED mails
Hi,
Gerfried Fuchs would like the ACCEPTED mails to include the distribution
name. I tried to create a patch for this purpose, also including the
distribution name in the INSTALLED mails. However the patch is not
tested at all as I don't have dak setup here.
There already was a __SUITE__ substitution variable in the templates for
both process-accepted.install and process-unchecked.accepted, but it was
unused (__SUITE__ is set to "" unconditionally). In the past __SUITE__
was set to " into stable" for stable updates.
Regards,
Ansgar
>From 20c0ecf223fabad2fb4144999451de634980cf19 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <ansgar@43-1.org>
Date: Mon, 30 Aug 2010 18:55:04 +0900
Subject: [PATCH] Include distribution name in ACCEPTED and INSTALLED mails
Signed-off-by: Ansgar Burchardt <ansgar@43-1.org>
---
daklib/queue.py | 2 +-
daklib/queue_install.py | 1 -
templates/process-accepted.install | 2 +-
templates/process-unchecked.accepted | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/daklib/queue.py b/daklib/queue.py
index 7ec5f09..3ad4a63 100755
--- a/daklib/queue.py
+++ b/daklib/queue.py
@@ -353,6 +353,7 @@ class Upload(object):
self.Subst["__REJECT_MESSAGE__"] = self.package_info()
self.Subst["__SOURCE__"] = self.pkg.changes.get("source", "Unknown")
self.Subst["__VERSION__"] = self.pkg.changes.get("version", "Unknown")
+ self.Subst["__SUITE__"] = self.pkg.changes.get("distribution", "unknown")
###########################################################################
def load_changes(self, filename):
@@ -1938,7 +1939,6 @@ distribution."""
UrgencyLog().log(self.pkg.dsc["source"], self.pkg.dsc["version"], self.pkg.changes["urgency"])
self.update_subst()
- self.Subst["__SUITE__"] = ""
self.Subst["__SUMMARY__"] = summary
mail_message = utils.TemplateSubst(self.Subst,
os.path.join(cnf["Dir::Templates"], 'process-unchecked.accepted'))
diff --git a/daklib/queue_install.py b/daklib/queue_install.py
index 627df43..bc1b873 100755
--- a/daklib/queue_install.py
+++ b/daklib/queue_install.py
@@ -72,7 +72,6 @@ def package_to_queue(u, summary, short_summary, queue, chg, session, announce=No
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)
diff --git a/templates/process-accepted.install b/templates/process-accepted.install
index 454fe81..c807c78 100644
--- a/templates/process-accepted.install
+++ b/templates/process-accepted.install
@@ -7,7 +7,7 @@ Precedence: bulk
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-Subject: __CHANGES_FILENAME__ INSTALLED__SUITE__
+Subject: __CHANGES_FILENAME__ INSTALLED into __SUITE__
__REJECT_MESSAGE__
Installing:
diff --git a/templates/process-unchecked.accepted b/templates/process-unchecked.accepted
index e726825..09b5e0c 100644
--- a/templates/process-unchecked.accepted
+++ b/templates/process-unchecked.accepted
@@ -7,7 +7,7 @@ Precedence: bulk
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-Subject: __CHANGES_FILENAME__ ACCEPTED__SUITE__
+Subject: __CHANGES_FILENAME__ ACCEPTED into __SUITE__
__REJECT_MESSAGE__
Accepted:
--
1.7.1
Reply to: