]> err.no Git - dak/commitdiff
Remove code to handle bug closures differently for NMUs or experimental uploads and...
authorJames Troup <james@nocrew.org>
Wed, 14 Feb 2007 22:13:39 +0000 (22:13 +0000)
committerJames Troup <james@nocrew.org>
Wed, 14 Feb 2007 22:13:39 +0000 (22:13 +0000)
ChangeLog
config/debian-non-US/dak.conf
config/debian-security/dak.conf
config/debian/dak.conf
daklib/queue.py
docs/README.config

index d934ff46214edabe00b41f8d1345e589a60cef33..f81d8123df3479fef72dab2fe5239ebf0ff73f7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-02-14  James Troup  <troup@ries.debian.org>
+
+       * docs/README.config: remove Dinstall::GroupOverrideFilename.
+       * config/debian/dak.conf: likewise.
+       * config/debian-non-US/dak.conf: likewise.
+       * config/debian-security/dak.conf: likewise.
+
+       * daklib/queue.py (Upload.close_bugs): no longer handle NMUs or
+       experimental differently, just close the bugs and let version
+       tracking sort it out.
+        (nmu_p): remove entire class - now unused.
+        (Upload.__init__): don't use nmu_p.
+
 2007-02-08  Anthony Towns  <ajt@debian.org>
 
        * config/debian/dak.conf: update for 3.1r4.  Use new 'etch'
index 363eed2f31194a4a33d5ee5011a138e863eb3904..2c14c7dbaaf85b9c65aad51aeabc02a0dec3ef95 100644 (file)
@@ -15,7 +15,6 @@ Dinstall
    TrackingServer "packages.qa.debian.org";
    LockFile "/org/non-us.debian.org/dak/lock";
    Bcc "archive@ftp-master.debian.org";
-   GroupOverrideFilename "override.group-maint";
    FutureTimeTravelGrace 28800; // 8 hours
    PastCutoffYear "1984";
    SkipTime 300;
index 3462467be5e1ee5dcdcac4b7bdc607a5883aacca..b146c637badedc8fdb914e608d353b8eae2796f1 100644 (file)
@@ -14,7 +14,6 @@ Dinstall
    PackagesServer "packages.debian.org";
    LockFile "/org/security.debian.org/dak/lock";
    Bcc "archive@ftp-master.debian.org";
-   // GroupOverrideFilename "override.group-maint";
    FutureTimeTravelGrace 28800; // 8 hours
    PastCutoffYear "1984";
    SkipTime 300;
index 1dc7c74c86ea62bb63c4aedce2af8416fe9879f1..b6e816c99f8fc5b9d9e0422003bce709ba6d688a 100644 (file)
@@ -15,7 +15,6 @@ Dinstall
    TrackingServer "packages.qa.debian.org";
    LockFile "/srv/ftp.debian.org/lock/dinstall.lock";
    Bcc "archive@ftp-master.debian.org";
-   GroupOverrideFilename "override.group-maint";
    FutureTimeTravelGrace 28800; // 8 hours
    PastCutoffYear "1984";
    SkipTime 300;
index e1b50b2f34ed5d6e4d7a3207b9af8bed05875900..2149dff30a39dfd6febb55c9a1763b3ec6560d28 100644 (file)
@@ -45,56 +45,10 @@ class Pkg:
 
 ###############################################################################
 
-class nmu_p:
-    # Read in the group maintainer override file
-    def __init__ (self, Cnf):
-        self.group_maint = {}
-        self.Cnf = Cnf
-        if Cnf.get("Dinstall::GroupOverrideFilename"):
-            filename = Cnf["Dir::Override"] + Cnf["Dinstall::GroupOverrideFilename"]
-            file = utils.open_file(filename)
-            for line in file.readlines():
-                line = utils.re_comments.sub('', line).lower().strip()
-                if line != "":
-                    self.group_maint[line] = 1
-            file.close()
-
-    def is_an_nmu (self, pkg):
-        Cnf = self.Cnf
-        changes = pkg.changes
-        dsc = pkg.dsc
-
-        i = utils.fix_maintainer (dsc.get("maintainer",
-                                          Cnf["Dinstall::MyEmailAddress"]).lower())
-        (dsc_rfc822, dsc_rfc2047, dsc_name, dsc_email) = i
-        # changes["changedbyname"] == dsc_name is probably never true, but better safe than sorry
-        if dsc_name == changes["maintainername"].lower() and \
-           (changes["changedby822"] == "" or changes["changedbyname"].lower() == dsc_name):
-            return 0
-
-        if dsc.has_key("uploaders"):
-            uploaders = dsc["uploaders"].lower().split(",")
-            uploadernames = {}
-            for i in uploaders:
-                (rfc822, rfc2047, name, email) = utils.fix_maintainer (i.strip())
-                uploadernames[name] = ""
-            if uploadernames.has_key(changes["changedbyname"].lower()):
-                return 0
-
-        # Some group maintained packages (e.g. Debian QA) are never NMU's
-        if self.group_maint.has_key(changes["maintaineremail"].lower()):
-            return 0
-
-        return 1
-
-###############################################################################
-
 class Upload:
 
     def __init__(self, Cnf):
         self.Cnf = Cnf
-        # Read in the group-maint override file
-        self.nmu = nmu_p(Cnf)
         self.accept_count = 0
         self.accept_bytes = 0L
         self.pkg = Pkg(changes = {}, dsc = {}, dsc_files = {}, files = {},
@@ -308,55 +262,26 @@ class Upload:
             return summary
 
         bugs.sort()
-        if not self.nmu.is_an_nmu(self.pkg):
-            if changes["distribution"].has_key("experimental"):
-               # tag bugs as fixed-in-experimental for uploads to experimental
-               summary += "Setting bugs to severity fixed: "
-               control_message = ""
-               for bug in bugs:
-                   summary += "%s " % (bug)
-                   control_message += "tag %s + fixed-in-experimental\n" % (bug)
-               if action and control_message != "":
-                   Subst["__CONTROL_MESSAGE__"] = control_message
-                   mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/process-unchecked.bug-experimental-fixed")
-                   utils.send_mail (mail_message)
-               if action:
-                   self.Logger.log(["setting bugs to fixed"]+bugs)
-
-
-           else:
-               summary += "Closing bugs: "
-               for bug in bugs:
-                   summary += "%s " % (bug)
-                   if action:
-                       Subst["__BUG_NUMBER__"] = bug
-                       if changes["distribution"].has_key("stable"):
-                           Subst["__STABLE_WARNING__"] = """
+        summary += "Closing bugs: "
+        for bug in bugs:
+            summary += "%s " % (bug)
+            if action:
+                Subst["__BUG_NUMBER__"] = bug
+                if changes["distribution"].has_key("stable"):
+                    Subst["__STABLE_WARNING__"] = """
 Note that this package is not part of the released stable Debian
 distribution.  It may have dependencies on other unreleased software,
 or other instabilities.  Please take care if you wish to install it.
 The update will eventually make its way into the next released Debian
 distribution."""
-                       else:
-                           Subst["__STABLE_WARNING__"] = ""
-                           mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/process-unchecked.bug-close")
-                           utils.send_mail (mail_message)
-                if action:
-                    self.Logger.log(["closing bugs"]+bugs)
-
-       else:                     # NMU
-            summary += "Setting bugs to severity fixed: "
-            control_message = ""
-            for bug in bugs:
-                summary += "%s " % (bug)
-                control_message += "tag %s + fixed\n" % (bug)
-            if action and control_message != "":
-                Subst["__CONTROL_MESSAGE__"] = control_message
-                mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/process-unchecked.bug-nmu-fixed")
-                utils.send_mail (mail_message)
-            if action:
-                self.Logger.log(["setting bugs to fixed"]+bugs)
+                else:
+                    Subst["__STABLE_WARNING__"] = ""
+                    mail_message = utils.TemplateSubst(Subst,Cnf["Dir::Templates"]+"/process-unchecked.bug-close")
+                    utils.send_mail (mail_message)
+        if action:
+            self.Logger.log(["closing bugs"]+bugs)
         summary += "\n"
+
         return summary
 
     ###########################################################################
index 52588bdc80ad2651416e79f1bca8e4df625a0b7a..29749f65e15d4c0536081d7d75c635cd1a9775e1 100644 (file)
@@ -213,7 +213,6 @@ Mandatory.  List of dinstall options, e.g.:
 |    TrackingServer "packages.qa.debian.org";
 |    LockFile "/org/ftp.debian.org/dak/lock";
 |    Bcc "archive@ftp-master.debian.org";
-|    GroupOverrideFilename "override.group-maint";
 |    FutureTimeTravelGrace 28800; // 8 hours
 |    PastCutoffYear "1984";
 |    BXANotify "false";
@@ -255,10 +254,6 @@ when in action mode (i.e. not using -n/--no-action).
 All sent mail is blind carbon copied to the email address in Bcc if it's
 not blank.
 
-GroupOverrideFilename (optional): this is the override file which contains
-the list of email addresses which, if part of the Maintainer field, cause
-uploads to always be treated as maintainer uploads.
-
 FutureTimeTravelGrace (required): specifies how many seconds into the
 future timestamps are allowed to be inside a deb before being rejected.