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

[dak/master] Remove unused unaccept



Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 daklib/queue.py                     |   39 -----------------------------------
 templates/process-accepted.unaccept |   23 --------------------
 2 files changed, 0 insertions(+), 62 deletions(-)
 delete mode 100644 templates/process-accepted.unaccept

diff --git a/daklib/queue.py b/daklib/queue.py
index e82992c..a4914aa 100755
--- a/daklib/queue.py
+++ b/daklib/queue.py
@@ -2620,45 +2620,6 @@ distribution."""
                     self.rejects.append("%s is NEW for %s." % (checkfile, suite))
 
     ################################################################################
-    # This is not really a reject, but an unaccept, but since a) the code for
-    # that is non-trivial (reopen bugs, unannounce etc.), b) this should be
-    # extremely rare, for now we'll go with whining at our admin folks...
-
-    def do_unaccept(self):
-        cnf = Config()
-
-        self.update_subst()
-        self.Subst["__REJECTOR_ADDRESS__"] = cnf["Dinstall::MyEmailAddress"]
-        self.Subst["__REJECT_MESSAGE__"] = self.package_info()
-        self.Subst["__CC__"] = "Cc: " + cnf["Dinstall::MyEmailAddress"]
-        self.Subst["__BCC__"] = "X-DAK: dak process-accepted"
-        if cnf.has_key("Dinstall::Bcc"):
-            self.Subst["__BCC__"] += "\nBcc: %s" % (cnf["Dinstall::Bcc"])
-
-        template = os.path.join(cnf["Dir::Templates"], "process-accepted.unaccept")
-
-        reject_mail_message = utils.TemplateSubst(self.Subst, template)
-
-        # Write the rejection email out as the <foo>.reason file
-        reason_filename = os.path.basename(self.pkg.changes_file[:-8]) + ".reason"
-        reject_filename = os.path.join(cnf["Dir::Queue::Reject"], reason_filename)
-
-        # If we fail here someone is probably trying to exploit the race
-        # so let's just raise an exception ...
-        if os.path.exists(reject_filename):
-            os.unlink(reject_filename)
-
-        fd = os.open(reject_filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0644)
-        os.write(fd, reject_mail_message)
-        os.close(fd)
-
-        utils.send_mail(reject_mail_message)
-
-        del self.Subst["__REJECTOR_ADDRESS__"]
-        del self.Subst["__REJECT_MESSAGE__"]
-        del self.Subst["__CC__"]
-
-    ################################################################################
     # If any file of an upload has a recent mtime then chances are good
     # the file is still being uploaded.
 
diff --git a/templates/process-accepted.unaccept b/templates/process-accepted.unaccept
deleted file mode 100644
index abb98db..0000000
--- a/templates/process-accepted.unaccept
+++ /dev/null
@@ -1,23 +0,0 @@
-From: __REJECTOR_ADDRESS__
-To: __MAINTAINER_TO__
-__CC__
-__BCC__
-X-Debian: DAK
-X-Debian-Package: __SOURCE__
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-Subject: __CHANGES_FILENAME__ UNACCEPT
-
-__REJECT_MESSAGE__
-
-===
-
-Despite being ACCEPTed, this package failed the database sanity checks
-at the time of install.  This should only happen rarely and in
-corner-cases (a binary upload of a package which has since been
-'dak rm'-d for example), so no code to do the necessary unaccept
-actions has been written.  These actions (e.g. bug reopening,
-announcement rescinding, etc.) will have to be done by hand.  Also,
-the files have been left in the accepted directory; please deal with
-them as well.
-- 
1.5.6.5



Reply to: