From 9e7e5f4ca31bc2d88c2dd588a24d4da8b32304a0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 19 Jul 2018 12:36:56 +0200 Subject: bin/seed-build-list: cleanup + new TODO --- bin/seed-build-list | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'bin/seed-build-list') diff --git a/bin/seed-build-list b/bin/seed-build-list index fb47793..44766aa 100755 --- a/bin/seed-build-list +++ b/bin/seed-build-list @@ -153,6 +153,8 @@ repos=$( printf '%s\n' 'multilib' ) +# TODO: this needs to be cleaned up - there is too much chaos in here + # generate must-haves query from mirror delta if [ -s "${tmp_dir}/mirrors" ]; then { @@ -250,11 +252,10 @@ fi printf ' SELECT DISTINCT `ignore_bin`.`pkgname`' printf ' FROM `binary_packages` AS `ignore_bin`' mysql_join_binary_packages_binary_packages_in_repositories 'ignore_bin' - printf ' WHERE `binary_packages_in_repositories`.`repository` IN (%s,%s)' \ "${repository_ids__any_build_list}" \ "${repository_ids__any_deletion_list}" - # packages with no not-to-be-deleted and at least on to-be-deleted version should be ignored + # packages with no not-to-be-deleted and at least one to-be-deleted version should be ignored printf ' OR (' printf '`binary_packages_in_repositories`.`is_to_be_deleted`' printf ' AND NOT EXISTS (' @@ -403,7 +404,7 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V printf ' WHERE `binary_packages`.`pkgname` NOT LIKE "lib32-%%"' printf ' AND `build_assignments`.`is_black_listed` IS NULL' printf ' AND NOT EXISTS (' - printf 'SELECT * FROM `dependencies`' + printf 'SELECT 1 FROM `dependencies`' mysql_join_dependencies_dependency_types printf ' AND (' printf '`dependency_types`.`relevant_for_building`' @@ -415,12 +416,10 @@ printf 'CREATE TEMPORARY TABLE `pkgbases` (`pkgbase` VARCHAR(64), `repository` V printf 'SELECT 1 FROM `install_target_providers`' mysql_join_install_target_providers_binary_packages '' 'it_bp' mysql_join_binary_packages_binary_packages_in_repositories 'it_bp' 'it_bpir' - printf ' WHERE `it_bp`.`build_assignment`!=`binary_packages`.`build_assignment`' - printf ' AND NOT `it_bpir`.`is_to_be_deleted`' + printf ' WHERE NOT `it_bpir`.`is_to_be_deleted`' printf ' AND `install_target_providers`.`install_target`=`dependencies`.`depending_on`' printf ')' printf ');\n' - printf 'DELETE `ignore_packages` FROM `ignore_packages`' printf ' JOIN `available` ON `available`.`pkgname`=`ignore_packages`.`pkgname`;\n' fi -- cgit v1.2.3-70-g09d2