From 78646fb55609f7c94ebaf1b2fb5cc422cf5451da Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 27 Jun 2018 21:21:07 +0200 Subject: bin/copy-to-build-support: only consider actual, not-yet-copied packages for copying --- bin/copy-to-build-support | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/copy-to-build-support b/bin/copy-to-build-support index faa93e7..fbc441d 100755 --- a/bin/copy-to-build-support +++ b/bin/copy-to-build-support @@ -90,6 +90,8 @@ sed -n ' printf 'SELECT `binary_packages`.`id`' printf ' FROM `binary_packages`' mysql_join_binary_packages_architectures + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories printf ' WHERE' printf ' `binary_packages`.`%s`=from_base64("%s") AND' \ 'epoch' "$(printf '%s' "${epoch}" | base64 -w0)" \ @@ -99,6 +101,12 @@ sed -n ' 'pkgname' "$(printf '%s' "${pkgname}" | base64 -w0)" printf ' `architectures`.`name`=from_base64("%s")' \ "$(printf '%s' "${architecture}" | base64 -w0)" + printf ' AND NOT EXISTS (' + printf 'SELECT 1 FROM `binary_packages_in_repositories` AS `bs_bpir`' + mysql_join_binary_packages_in_repositories_repositories 'bs_bpir' 'bs_r' + printf ' WHERE `bs_bpir`.`package`=`binary_packages`.`id`' + printf ' AND `bs_r`.`name`="build-support"' + printf ') AND `repositories`.`is_on_master_mirror`' printf ' LIMIT 1;\n' } | \ mysql_run_query -- cgit v1.2.3-70-g09d2