]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/queue.py
rename known_changes
[dak.git] / daklib / queue.py
index 44f63263d4830481e89e18f9ef24af63abe333ec..39dab347da5133fcbeb3da741b41dfc2b59da75c 100755 (executable)
@@ -441,7 +441,7 @@ class Upload(object):
         # Check there isn't already a changes file of the same name in one
         # of the queue directories.
         base_filename = os.path.basename(filename)
-        if get_knownchange(base_filename):
+        if get_dbchange(base_filename):
             self.rejects.append("%s: a file with this name already exists." % (base_filename))
 
         # Check the .changes is non-empty
@@ -822,7 +822,7 @@ class Upload(object):
         session = DBConn().session()
 
         try:
-            changes = session.query(KnownChange).filter_by(changesname=base_filename).one()
+            changes = session.query(DBChange).filter_by(changesname=base_filename).one()
             if not changes.approved_for:
                 self.rejects.append("%s file already known to dak" % base_filename)
         except NoResultFound, e:
@@ -1962,11 +1962,12 @@ distribution."""
             os.rename(temp_filename, filename)
             os.chmod(filename, 0644)
 
-        # auto-build queue
-#        res = get_or_set_queue('buildd', session).autobuild_upload(self.pkg, session)
-#        if res:
-#            utils.fubar(res)
-#            now_date = datetime.now()
+        # This routine returns None on success or an error on failure
+        # TODO: Replace queue copying using the new queue.add_file_from_pool routine
+        #       and by looking up which queues in suite.copy_queues
+        #res = get_queue('accepted').autobuild_upload(self.pkg, cnf["Dir::Queue::Accepted"])
+        #if res:
+        #    utils.fubar(res)
 
         session.commit()
 
@@ -2021,7 +2022,7 @@ distribution."""
             os.unlink(os.path.join(from_dir, f))
             if os.path.exists(os.path.join(h.holding_dir, f)):
                 os.unlink(os.path.join(h.holding_dir, f))
-                          
+
         os.unlink(os.path.join(from_dir, self.pkg.changes_file))
         if os.path.exists(os.path.join(h.holding_dir, self.pkg.changes_file)):
             os.unlink(os.path.join(h.holding_dir, self.pkg.changes_file))