From e3f29f0d862af2f9e550f8cec419ff353fdf42b1 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 26 Mar 2011 07:57:05 +0000 Subject: [PATCH] sort generated Packages and Sources Signed-off-by: Ansgar Burchardt --- dak/generate_packages_sources2.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py index 5a1008c4..b515dce2 100755 --- a/dak/generate_packages_sources2.py +++ b/dak/generate_packages_sources2.py @@ -65,7 +65,7 @@ SELECT WHEN key = 'Checksums-Sha1' THEN E'Checksums-Sha1\:\n ' || f.sha1sum || ' ' || f.size || ' ' || SUBSTRING(f.filename FROM E'/([^/]*)\\Z') WHEN key = 'Checksums-Sha256' THEN E'Checksums-Sha256\:\n ' || f.sha256sum || ' ' || f.size || ' ' || SUBSTRING(f.filename FROM E'/([^/]*)\\Z') ELSE key || '\: ' - END || value, E'\n' ORDER BY mk.order) + END || value, E'\n' ORDER BY mk.order, mk.key) FROM source_metadata sm JOIN metadata_keys mk ON mk.key_id = sm.key_id @@ -162,7 +162,7 @@ WITH SELECT (SELECT - STRING_AGG(key || '\: ' || value, E'\n' ORDER BY mk.order) + STRING_AGG(key || '\: ' || value, E'\n' ORDER BY mk.order, mk.key) FROM binaries_metadata bm JOIN metadata_keys mk ON mk.key_id = bm.key_id @@ -194,6 +194,8 @@ WHERE ) AND o.type = :type_id AND o.suite = :suite AND o.component = :component + +ORDER BY tmp.package, tmp.version """ def open_packages(suite, component, architecture, type_name): @@ -233,6 +235,7 @@ def generate_packages(suite_id, component_id, architecture_id, type_name): "type_id": type_id, "type_name": type_name, "arch_all": arch_all_id}) for (stanza,) in r: print >>output, stanza + print >>output, "" session.close() -- 2.39.5