From e02c623be4a83422766d20611c6fadde362be98e Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <ansgar@debian.org>
Date: Thu, 12 Jul 2012 11:32:20 -0600
Subject: [PATCH] config/*/dinstall.functions: include Built-Using sources

Include source packages only referenced by Built-Using in per-suite
source indices.
---
 config/backports/dinstall.functions | 5 +++++
 config/debian/dinstall.functions    | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/config/backports/dinstall.functions b/config/backports/dinstall.functions
index 2ef349b2..67b40de2 100644
--- a/config/backports/dinstall.functions
+++ b/config/backports/dinstall.functions
@@ -318,6 +318,11 @@ function mkfilesindices() {
                FROM src_associations sa
               WHERE sa.suite = $suite_id
              UNION
+             SELECT esr.src_id
+               FROM extra_src_references esr
+               JOIN bin_associations ba ON esr.bin_id = ba.bin
+               WHERE ba.suite = $suite_id
+             UNION
              SELECT b.source AS source
                FROM bin_associations ba
                JOIN binaries b ON ba.bin = b.id WHERE ba.suite = $suite_id) s
diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions
index 66840812..c21c10a2 100644
--- a/config/debian/dinstall.functions
+++ b/config/debian/dinstall.functions
@@ -301,6 +301,11 @@ function mkfilesindices() {
                FROM src_associations sa
               WHERE sa.suite = $suite_id
              UNION
+             SELECT esr.src_id
+               FROM extra_src_references esr
+               JOIN bin_associations ba ON esr.bin_id = ba.bin
+               WHERE ba.suite = $suite_id
+             UNION
              SELECT b.source AS source
                FROM bin_associations ba
                JOIN binaries b ON ba.bin = b.id WHERE ba.suite = $suite_id) s
-- 
2.39.5