]> err.no Git - dak/commitdiff
Hack to make process policy work again
authorMark Hymers <mhy@debian.org>
Sun, 29 Aug 2010 20:55:10 +0000 (20:55 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 29 Aug 2010 20:55:10 +0000 (20:55 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/queue.py

index afd3277840ed153b7972eba59191eb19623b04f6..d89284a3f17b4754fc5fd8c5d725d1f44d24962a 100755 (executable)
@@ -329,11 +329,17 @@ class Upload(object):
             self.Subst["__MAINTAINER_TO__"] = self.pkg.changes["maintainer2047"]
             self.Subst["__MAINTAINER__"] = self.pkg.changes.get("maintainer", "Unknown")
 
-        session = DBConn().session()
-        fpr = get_fingerprint(self.pkg.changes['fingerprint'], session)
-        if self.check_if_upload_is_sponsored("%s@debian.org" % fpr.uid.uid, fpr.uid.name):
-            self.Subst["__MAINTAINER_TO__"] += ", %s" % self.pkg.changes["sponsoremail"]
-        session.close()
+        # Process policy doesn't set the fingerprint field and I don't want to make it
+        # do it for now as I don't want to have to deal with the case where we accepted
+        # the package into PU-NEW, but the fingerprint has gone away from the keyring in
+        # the meantime so the package will be remarked as rejectable.  Urgh.
+        # TODO: Fix this properly
+        if self.pkg.changes.has_key('fingerprint'):
+            session = DBConn().session()
+            fpr = get_fingerprint(self.pkg.changes['fingerprint'], session)
+            if self.check_if_upload_is_sponsored("%s@debian.org" % fpr.uid.uid, fpr.uid.name):
+                self.Subst["__MAINTAINER_TO__"] += ", %s" % self.pkg.changes["sponsoremail"]
+            session.close()
 
         if cnf.has_key("Dinstall::TrackingServer") and self.pkg.changes.has_key("source"):
             self.Subst["__MAINTAINER_TO__"] += "\nBcc: %s@%s" % (self.pkg.changes["source"], cnf["Dinstall::TrackingServer"])