index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-09-13 14:56:28 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-13 14:56:28 +0200 |
commit | b8fbd4f85572ba7d7bc565198c0d06200d52626c (patch) | |
tree | 8b23ccc5ab8c9d71e8b33fa7a40f5ec5e7e9cc2f | |
parent | e28ab05ccaac435693ceeb062b47912a4b19043b (diff) |
-rwxr-xr-x | lib/mysql-functions | 24 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index 5b83b34..7cafb79 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -682,10 +682,14 @@ mysql_sanity_check() { ) } +# mysql_find_build_assignment_loops +# recreate the `build_dependency_loops` table mysql_find_build_assignment_loops() { new_loops=$( { - printf 'SELECT DISTINCT `packages_dependency`.`build_assignment`,`packages_dependent`.`build_assignment`' + printf 'SELECT DISTINCT' + printf ' `packages_dependency`.`build_assignment`,' + printf '`packages_dependent`.`build_assignment`' printf ' FROM `dependencies`' mysql_join_dependencies_dependency_types mysql_join_dependencies_install_target_providers_with_versions @@ -697,7 +701,23 @@ mysql_find_build_assignment_loops() { "${repository_ids__any_build_list}" printf ' AND `packages_in_repository_dependency`.`repository`=%s' \ "${repository_ids__any_build_list}" - printf ' AND `dependency_types`.`relevant_for_building`;\n' + printf ' AND `dependency_types`.`relevant_for_building`' + printf ' AND (' + printf '`dependency_types`.`relevant_for_binary_packages`' + printf ' OR NOT EXISTS (' + printf 'SELECT 1 FROM `binary_packages_in_repositories` AS `subst_bpir`' + mysql_join_binary_packages_in_repositories_repositories 'subst_bpir' 'subst_r' + printf ' AND `subst_r`.`is_on_master_mirror`' + mysql_join_binary_packages_in_repositories_install_target_providers 'subst_bpir' 'subst_itp' + mysql_join_install_target_providers_versions 'subst_itp' 'subst_itp_v' + printf ' WHERE `subst_itp`.`install_target`=`dependencies`.`depending_on`' + printf ' AND ' + mysql_query_ordering_correct \ + '`dependencies_versions`.`order`' \ + '`subst_itp_v`.`order`' \ + '`dependencies`.`version_relation`' + printf ')' + printf ');\n' } | \ mysql_run_query | \ tr '\t' ' ' | \ |