]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
Merge commit 'mhy/master' into merge
[dak.git] / daklib / queue.py
index 9ea69c414612d7336f26d21330e68679109b599e..b1383be035c829a568a66ab71523b24dd38378bc 100755 (executable)
@@ -72,7 +72,7 @@ def get_type(f, session):
     """
     # Determine the type
     if f.has_key("dbtype"):
-        file_type = file["dbtype"]
+        file_type = f["dbtype"]
     elif f["type"] in [ "orig.tar.gz", "orig.tar.bz2", "tar.gz", "tar.bz2", "diff.gz", "diff.bz2", "dsc" ]:
         file_type = "dsc"
     else:
@@ -353,7 +353,7 @@ class Upload(object):
     ###########################################################################
     def load_changes(self, filename):
         """
-        @rtype boolean
+        @rtype: boolean
         @rvalue: whether the changes file was valid or not.  We may want to
                  reject even if this is True (see what gets put in self.rejects).
                  This is simply to prevent us even trying things later which will
@@ -690,11 +690,12 @@ class Upload(object):
         # Check the version and for file overwrites
         self.check_binary_against_db(f, session)
 
-        b = Binary(f)
-        b.scan_package()
-        if len(b.rejects) > 0:
-            for j in b.rejects:
-                self.rejects.append(j)
+        # Temporarily disable contents generation until we change the table storage layout
+        #b = Binary(f)
+        #b.scan_package()
+        #if len(b.rejects) > 0:
+        #    for j in b.rejects:
+        #        self.rejects.append(j)
 
     def source_file_checks(self, f, session):
         entry = self.pkg.files[f]
@@ -1320,19 +1321,19 @@ class Upload(object):
                         sourcepkg, trans)
 
                     if current is not None:
-                        currentlymsg = "at version %s" % (current)
+                        currentlymsg = "at version %s" % (current.version)
                     else:
                         currentlymsg = "not present in testing"
 
                     rejectmsg += "Transition description: %s\n\n" % (t["reason"])
 
                     rejectmsg += "\n".join(textwrap.wrap("""Your package
-    is part of a testing transition designed to get %s migrated (it is
-    currently %s, we need version %s).  This transition is managed by the
-    Release Team, and %s is the Release-Team member responsible for it.
-    Please mail debian-release@lists.debian.org or contact %s directly if you
-    need further assistance.  You might want to upload to experimental until this
-    transition is done."""
+is part of a testing transition designed to get %s migrated (it is
+currently %s, we need version %s).  This transition is managed by the
+Release Team, and %s is the Release-Team member responsible for it.
+Please mail debian-release@lists.debian.org or contact %s directly if you
+need further assistance.  You might want to upload to experimental until this
+transition is done."""
                             % (source, currentlymsg, expected,t["rm"], t["rm"])))
 
                     self.rejects.append(rejectmsg)
@@ -1848,7 +1849,7 @@ distribution."""
             user_email_address = utils.whoami() + " <%s>" % (cnf["Dinstall::MyAdminAddress"])
             self.Subst["__REJECTOR_ADDRESS__"] = user_email_address
             self.Subst["__MANUAL_REJECT_MESSAGE__"] = reject_message
-            self.Subst["__CC__"] = "Cc: " + Cnf["Dinstall::MyEmailAddress"]
+            self.Subst["__CC__"] = "Cc: " + cnf["Dinstall::MyEmailAddress"]
             reject_mail_message = utils.TemplateSubst(self.Subst, rej_template)
             # Write the rejection email out as the <foo>.reason file
             os.write(reason_fd, reject_mail_message)