]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/changesutils.py
Some lintian tags got renamed with 2.5.0
[dak.git] / daklib / changesutils.py
old mode 100644 (file)
new mode 100755 (executable)
index 35b3d57..3a4c6dd
@@ -84,7 +84,7 @@ def sg_compare (a, b):
 
 __all__.append('sg_compare')
 
 
 __all__.append('sg_compare')
 
-def sort_changes(changes_files, session):
+def sort_changes(changes_files, session, binaries = None):
     """Sort into source groups, then sort each source group by version,
     have source, filename.  Finally, sort the source groups by have
     note, time of oldest upload of each source upload."""
     """Sort into source groups, then sort each source group by version,
     have source, filename.  Finally, sort the source groups by have
     note, time of oldest upload of each source upload."""
@@ -116,7 +116,7 @@ def sort_changes(changes_files, session):
     # Determine oldest time and have note status for each source group
     for source in per_source.keys():
         q = session.query(DBSource).filter_by(source = source).all()
     # Determine oldest time and have note status for each source group
     for source in per_source.keys():
         q = session.query(DBSource).filter_by(source = source).all()
-        per_source[source]["source_in_database"] = len(q)>0
+        per_source[source]["source_in_database"] = binaries and -(len(q)>0) or len(q)>0
         source_list = per_source[source]["list"]
         first = source_list[0]
         oldest = os.stat(first["filename"])[stat.ST_MTIME]
         source_list = per_source[source]["list"]
         first = source_list[0]
         oldest = os.stat(first["filename"])[stat.ST_MTIME]
@@ -178,26 +178,14 @@ def new_accept(upload, dry_run, session):
         cnf = Config()
 
         (summary, short_summary) = upload.build_summaries()
         cnf = Config()
 
         (summary, short_summary) = upload.build_summaries()
+        destqueue = get_policy_queue('newstage', session)
 
 
-        # XXX: mhy: I think this is wrong as these are all attributes on the
-        # build and policy queues now
-        if cnf.FindB("Dinstall::SecurityQueueHandling"):
-            upload.dump_vars(cnf["Dir::Queue::Embargoed"])
-            upload.move_to_queue(get_policy_queue('embargoed'))
-            upload.queue_build("embargoed", cnf["Dir::Queue::Embargoed"])
-            # Check for override disparities
-            upload.Subst["__SUMMARY__"] = summary
-        else:
-            # Just a normal upload, accept it...
-            (summary, short_summary) = upload.build_summaries()
-            destqueue = get_policy_queue('newstage', session)
-
-            srcqueue = get_policy_queue_from_path(upload.pkg.directory, session)
+        srcqueue = get_policy_queue_from_path(upload.pkg.directory, session)
 
 
-            if not srcqueue:
-                # Assume NEW and hope for the best
-                srcqueue = get_policy_queue('new', session)
+        if not srcqueue:
+            # Assume NEW and hope for the best
+            srcqueue = get_policy_queue('new', session)
 
 
-            changes_to_queue(upload, srcqueue, destqueue, session)
+        changes_to_queue(upload, srcqueue, destqueue, session)
 
 __all__.append('new_accept')
 
 __all__.append('new_accept')