From 7ff13e834be11f675c5b62ae92ebd857a2c245d4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 17 Sep 2018 22:11:28 +0200 Subject: lib/mysql-functions: mysql_query_has_pending_dependencies() should ignore dependencies which have identical build_assignments --- lib/mysql-functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index dd17fde..aba6ce6 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -939,6 +939,8 @@ mysql_query_has_pending_dependencies() { printf ' ON `architecture_compatibilities`.`built_for`=`dep_bp`.`architecture`' printf ' AND `architecture_compatibilities`.`fully_compatible`' printf ' WHERE `l_itps`.`install_target`=`l_deps`.`depending_on`' + printf ' AND `dep_bp`.`build_assignment`!=%s' \ + "$2" printf ' AND `architecture_compatibilities`.`runs_on`=%s' \ "$1" # version is irelevant: either the package is built and we don't @@ -953,9 +955,12 @@ mysql_query_has_pending_dependencies() { mysql_join_install_target_providers_binary_packages 'l_itps' 'dep_bp' mysql_join_binary_packages_binary_packages_in_repositories 'dep_bp' 'dep_bpir' mysql_join_binary_packages_in_repositories_repositories 'dep_bpir' 'dep_r' - printf ' AND `dep_r`.`is_on_master_mirror`' printf ' WHERE `l_itps`.`install_target`=`l_deps`.`depending_on`' - printf ' AND `dep_r`.`architecture`=%s' \ + printf ' AND (' + printf '`dep_r`.`is_on_master_mirror`' + printf ' OR `dep_bp`.`build_assignment`=%s' \ + "$2" + printf ') AND `dep_r`.`architecture`=%s' \ "$1" printf ' AND ' mysql_query_ordering_correct \ -- cgit v1.2.3-70-g09d2