[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] include only packages in the right component in Sources



Having overrides for the same package in multiple components should not
cause source packages to be listed in the wrong Sources index.

Reference: https://lists.debian.org/debian-mirrors/2012/09/msg00020.html
---
 dak/generate_packages_sources2.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py
index ff89037..4cf8359 100755
--- a/dak/generate_packages_sources2.py
+++ b/dak/generate_packages_sources2.py
@@ -78,6 +78,10 @@ FROM
 source s
 JOIN src_associations sa ON s.id = sa.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
-- 
1.7.2.5


Reply to: