X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fchangesutils.py;h=b268add58810c7e7242d09ca72c04eb769ef753a;hb=db4d3b713caf2fdc24b44d08214a6a9b1b006f17;hp=35b3d57be454634dac1fc45a29c2d3e380fc0903;hpb=95109ebb89d25a20ccb89fd10a857585fb23f8a6;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]