index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | lib/mysql-functions | 15 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index 97f3c88..0fbd84e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -1027,7 +1027,8 @@ mysql_cleanup() { } # mysql_query_has_pending_dependencies builder-architecture.id `build_assignment`.`id` -# print a mysql query giving whether dependencies are pending +# print a mysql query giving whether dependencies are pending (unsuccessfully built +# dependencies do not count after 1 day) mysql_query_has_pending_dependencies() { # we have pending dependencies ... printf 'EXISTS (' @@ -1059,6 +1060,18 @@ mysql_query_has_pending_dependencies() { mysql_join_binary_packages_binary_packages_in_repositories 'dep_bp' 'dep_bpir' printf ' AND `dep_bpir`.`repository`=%s' \ "${repository_ids__any_build_list}" + mysql_join_binary_packages_build_assignments 'dep_bp' 'dep_ba' + # ignore dependencies which are broken >=1 day + printf ' AND (' + printf 'NOT EXISTS (' + printf 'SELECT 1' + printf ' FROM `failed_builds`' + printf ' WHERE `failed_builds`.`date`<=ADDTIME(NOW(),"-1 00:00:00")' + printf ' AND `failed_builds`.`build_assignment`=`dep_ba`.`id`' + printf ')' + # haskell-* is a hopeless case in this regard + printf ' OR `binary_packages`.`name` LIKE "haskell-%%"' + printf ')' printf ' JOIN `architecture_compatibilities`' printf ' ON `architecture_compatibilities`.`built_for`=`dep_bp`.`architecture`' printf ' AND `architecture_compatibilities`.`fully_compatible`' |