diff options
author | Erich Eckner <git@eckner.net> | 2018-02-26 20:31:30 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-26 20:31:30 +0100 |
commit | 6dd8f08841badc851ee88ebcf0364068a4a42e2e (patch) | |
tree | 72909ced3c856a278ac6aa87f768c6d0a632be50 /bin/seed-build-list | |
parent | 3c876e32b322c15326b5835bb4fef1a02adbcbb6 (diff) | |
download | builder-6dd8f08841badc851ee88ebcf0364068a4a42e2e.tar.xz |
bin/seed-build-list: ignore to-be-deleted packages, too
Diffstat (limited to 'bin/seed-build-list')
-rwxr-xr-x | bin/seed-build-list | 16 |
1 files 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" |