X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_packages_sources2.py;h=ed12e9f14a0fa2eefc968e4597c4b71b62ba3960;hb=519c1dbf89c13557afc15a429164616ac563d379;hp=f3181fd45e1c5200a77598542f36bec3b94919cc;hpb=8da2e7beb9591390ad12aaed29a4eb13aaa3a07d;p=dak.git diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py index f3181fd4..ed12e9f1 100755 --- a/dak/generate_packages_sources2.py +++ b/dak/generate_packages_sources2.py @@ -94,9 +94,6 @@ LEFT JOIN override o ON o.package = s.source LEFT JOIN section sec ON o.section = sec.id LEFT JOIN priority pri ON o.priority = pri.id -WHERE - (src_associations_full.extra_source OR o.suite IS NOT NULL) - ORDER BY s.source, s.version """ @@ -155,7 +152,15 @@ WITH f.size AS size, f.md5sum AS md5sum, f.sha1sum AS sha1sum, - f.sha256sum AS sha256sum + f.sha256sum AS sha256sum, + (SELECT value FROM binaries_metadata + WHERE bin_id = b.id + AND key_id = (SELECT key_id FROM metadata_keys WHERE key = 'Priority')) + AS fallback_priority, + (SELECT value FROM binaries_metadata + WHERE bin_id = b.id + AND key_id = (SELECT key_id FROM metadata_keys WHERE key = 'Section')) + AS fallback_section FROM binaries b JOIN bin_associations ba ON b.id = ba.bin @@ -192,8 +197,8 @@ SELECT eo.package = tmp.package AND eo.suite = :overridesuite AND eo.component = :component ), '') - || E'\nSection\: ' || sec.section - || E'\nPriority\: ' || pri.priority + || E'\nSection\: ' || COALESCE(sec.section, tmp.fallback_section) + || E'\nPriority\: ' || COALESCE(pri.priority, tmp.fallback_priority) || E'\nFilename\: pool/' || :component_name || '/' || tmp.filename || E'\nSize\: ' || tmp.size || E'\nMD5sum\: ' || tmp.md5sum @@ -202,9 +207,12 @@ SELECT FROM tmp - JOIN override o ON o.package = tmp.package - JOIN section sec ON sec.id = o.section - JOIN priority pri ON pri.id = o.priority + LEFT JOIN override o ON o.package = tmp.package + AND o.type = :type_id + AND o.suite = :overridesuite + AND o.component = :component + LEFT JOIN section sec ON sec.id = o.section + LEFT JOIN priority pri ON pri.id = o.priority WHERE ( @@ -214,8 +222,6 @@ WHERE OR (architecture = :arch_all AND source NOT IN (SELECT DISTINCT source FROM tmp WHERE architecture <> :arch_all)) ) - AND - o.type = :type_id AND o.suite = :overridesuite AND o.component = :component ORDER BY tmp.source, tmp.package, tmp.version """