From 6dd8f08841badc851ee88ebcf0364068a4a42e2e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 26 Feb 2018 20:31:30 +0100 Subject: bin/seed-build-list: ignore to-be-deleted packages, too --- bin/seed-build-list | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/seed-build-list b/bin/seed-build-list index 284c555..26b386d 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -159,10 +159,18 @@ fi fi # packages on the build-list or deletion-list should be ignored printf 'INSERT IGNORE INTO `ignore_packages` (`pkgname`)' - printf ' SELECT DISTINCT `binary_packages`.`pkgname`' - printf ' FROM `binary_packages`' - mysql_join_binary_packages_repositories - printf ' WHERE `repositories`.`name` IN ("build-list","deletion-list");\n' + printf ' SELECT DISTINCT `ignore_bin`.`pkgname`' + printf ' FROM `binary_packages` AS `ignore_bin`' + mysql_join_binary_packages_repositories 'ignore_bin' + printf ' WHERE `repositories`.`name` IN ("build-list","deletion-list")' + # packages with no not-to-be-deleted and at least on to-be-deleted version should be ignored + printf ' OR (' + printf '`ignore_bin`.`is_to_be_deleted`' + printf ' AND NOT EXISTS (' + printf 'SELECT * FROM `binary_packages` AS `other_bin`' + printf ' WHERE NOT `other_bin`.`is_to_be_deleted`' + printf ' AND `other_bin`.`pkgname`=`ignore_bin`.`pkgname`' + printf '));\n' } | \ sponge "${tmp_dir}/ignore-packages" -- cgit v1.2.3-70-g09d2