X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fchangesutils.py;h=b268add58810c7e7242d09ca72c04eb769ef753a;hb=1be362fc8d75fe02f54b624be11f4d941e5328fe;hp=35b3d57be454634dac1fc45a29c2d3e380fc0903;hpb=d0940f70aea01a1a7ab1715757f8aae535ec0dde;p=dak.git diff --git a/daklib/changesutils.py b/daklib/changesutils.py index 35b3d57b..b268add5 100644 --- a/daklib/changesutils.py +++ b/daklib/changesutils.py @@ -84,7 +84,7 @@ def sg_compare (a, b): __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.""" @@ -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() - 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]