Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-12-06 09:51:25 +0100
committerErich Eckner <git@eckner.net>2019-12-06 09:51:25 +0100
commit6cdbec053abab30914b7d5cf03be1036dc799d12 (patch)
treea5506ad463ade5741b340b5d04a671a12d805042 /lib/mysql-functions
parentae2f05e4853bc4781635b156a0ade9411187f7d4 (diff)
lib/mysql-functions: 1 day after the first build failure, still unbuilt dependencies get ignored - we need to move on
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions15
1 files changed, 14 insertions, 1 deletions
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`'