]> git.decadent.org.uk Git - dak.git/blobdiff - dak/generate_packages_sources2.py
pdiff shit
[dak.git] / dak / generate_packages_sources2.py
index b157fcbe5fc989d0bb1adce55b9237c1d11313e1..34ffab57ae052261bf82d0eb6ae4adb1fbcf814d 100755 (executable)
@@ -123,6 +123,9 @@ def generate_sources(suite_id, component_id):
 
 #############################################################################
 
+# We currently filter out the "Tag" line. They are set by external overrides and
+# NOT by the maintainer. And actually having it set by maintainer means we output
+# it twice at the moment -> which breaks dselect.
 # Here be large dragons.
 _packages_query = R"""
 WITH
@@ -160,7 +163,7 @@ SELECT
      JOIN metadata_keys mk ON mk.key_id = bm.key_id
    WHERE
      bm.bin_id = tmp.binary_id
-     AND key != 'Section' AND key != 'Priority'
+     AND key != 'Section' AND key != 'Priority' AND key != 'Tag'
   )
   || COALESCE(E'\n' || (SELECT
      STRING_AGG(key || '\: ' || value, E'\n' ORDER BY key)
@@ -194,7 +197,7 @@ WHERE
   AND
     o.type = :type_id AND o.suite = :overridesuite AND o.component = :component
 
-ORDER BY tmp.package, tmp.version
+ORDER BY tmp.source, tmp.package, tmp.version
 """
 
 def generate_packages(suite_id, component_id, architecture_id, type_name):
@@ -282,6 +285,8 @@ def main():
         for c in component_ids:
             pool.apply_async(generate_sources, [s.suite_id, c], callback=parse_results)
             for a in s.architectures:
+                if a == 'source':
+                    continue
                 pool.apply_async(generate_packages, [s.suite_id, c, a.arch_id, 'deb'], callback=parse_results)
                 pool.apply_async(generate_packages, [s.suite_id, c, a.arch_id, 'udeb'], callback=parse_results)