summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-26 15:03:24 +0200
committerErich Eckner <git@eckner.net>2018-04-26 15:03:24 +0200
commit35efee7d4caa708b0971df9a4c2c8da092b93a7a (patch)
treee2442e6dccdb1112a28786f83f15557a11c52be1
parentdebfc92ee0263d726c4bb9587351e7f9f2f8aef3 (diff)
downloadbuilder-35efee7d4caa708b0971df9a4c2c8da092b93a7a.tar.xz
bin/build-master-status: fix "next_packages"
-rwxr-xr-xbin/build-master-status23
1 files changed, 14 insertions, 9 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index 9d8f2d1..7ab38d4 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -206,15 +206,20 @@ if [ ! -s "${work_dir}/build-master-sanity" ]; then
mysql_join_build_assignments_binary_packages
mysql_join_binary_packages_repositories
printf ' WHERE `repositories`.`name`="build-list"'
- printf ' AND NOT EXISTS ('
- printf 'SELECT * FROM `dependencies`'
- mysql_join_dependencies_dependency_types
- printf ' AND `dependency_types`.`relevant_for_binary_packages`'
- mysql_join_dependencies_install_target_providers
- mysql_join_install_target_providers_binary_packages '' 'prov_bp'
- mysql_join_binary_packages_repositories 'prov_bp' 'prov_r'
- printf ' WHERE `prov_r`.`name`="build-list"'
- printf ' AND `dependencies`.`dependent`=`binary_packages`.`id`'
+ printf ' AND ('
+ printf 'NOT EXISTS ('
+ printf 'SELECT 1 FROM `dependencies`'
+ mysql_join_dependencies_dependency_types
+ printf ' AND `dependency_types`.`relevant_for_building`'
+ mysql_join_dependencies_install_target_providers
+ mysql_join_install_target_providers_binary_packages '' 'prov_bp'
+ mysql_join_binary_packages_repositories 'prov_bp' 'prov_r'
+ printf ' WHERE `prov_r`.`name`="build-list"'
+ printf ' AND `dependencies`.`dependent`=`binary_packages`.`id`'
+ printf ') OR EXISTS ('
+ printf 'SELECT 1 FROM `build_dependency_loops`'
+ printf ' WHERE `build_dependency_loops`.`build_assignment`=`build_assignments`.`id`'
+ printf ')'
printf '))'
printf ');\n'
} | \