X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_packages_sources2.py;h=2c69afce73c60108914a454ba197bd0ff921287c;hb=d74d0da2671139d6f359a8f59c0b5f74808e5f1a;hp=4cf8359abc245c3c728fb87fe86b9799aaeb6671;hpb=85d1b6da9617e8ac8d235b4705ebee23916f57ed;p=dak.git diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py index 4cf8359a..2c69afce 100755 --- a/dak/generate_packages_sources2.py +++ b/dak/generate_packages_sources2.py @@ -67,28 +67,35 @@ SELECT WHERE s.id=sm.src_id ) || + CASE + WHEN src_associations_full.extra_source THEN E'\nExtra-Source-Only\: yes' + ELSE '' + END + || E'\nDirectory\: pool/' || :component_name || '/' || SUBSTRING(f.filename FROM E'\\A(.*)/[^/]*\\Z') || - E'\nPriority\: ' || pri.priority + E'\nPriority\: ' || COALESCE(pri.priority, 'extra') || - E'\nSection\: ' || sec.section + E'\nSection\: ' || COALESCE(sec.section, 'misc') FROM source s -JOIN src_associations sa ON s.id = sa.source +JOIN src_associations_full ON src_associations_full.suite = :suite AND s.id = src_associations_full.source JOIN files f ON s.file=f.id JOIN files_archive_map fam ON fam.file_id = f.id AND fam.archive_id = (SELECT archive_id FROM suite WHERE id = :suite) AND fam.component_id = :component -JOIN override o ON o.package = s.source -JOIN section sec ON o.section = sec.id -JOIN priority pri ON o.priority = pri.id +LEFT JOIN override o ON o.package = s.source + AND o.suite = :overridesuite + AND o.component = :component + AND o.type = :dsc_type +LEFT JOIN section sec ON o.section = sec.id +LEFT JOIN priority pri ON o.priority = pri.id WHERE - sa.suite = :suite - AND o.suite = :overridesuite AND o.component = :component AND o.type = :dsc_type + (src_associations_full.extra_source OR o.suite IS NOT NULL) ORDER BY s.source, s.version @@ -357,7 +364,6 @@ def main(): force = Options.has_key("Force") and Options["Force"] - component_ids = [ c.component_id for c in session.query(Component).all() ] def parse_results(message): # Split out into (code, msg) @@ -370,6 +376,7 @@ def main(): logger.log(['E: ', msg]) for s in suites: + component_ids = [ c.component_id for c in s.components ] if s.untouchable and not force: import utils utils.fubar("Refusing to touch %s (untouchable and not forced)" % s.suite_name)