Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/mysql-functions24
1 files changed, 22 insertions, 2 deletions
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' ' ' | \