summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/bootstrap-mysql15
-rw-r--r--misc/database-layout.dump7
2 files changed, 17 insertions, 5 deletions
diff --git a/bin/bootstrap-mysql b/bin/bootstrap-mysql
index 04b06bf..a1c23be 100755
--- a/bin/bootstrap-mysql
+++ b/bin/bootstrap-mysql
@@ -256,11 +256,6 @@ fi
done
done
- # TODO: We might want to deliberately break packages that fail(ed) to build
- # for quite some time. Suggestion: packages with a failed build older than
- # x days get removed from our lists, so their dependencies cannot hold
- # back anything else.
-
# packages which should not be replaced: ones providing something that is:
# a) still needed by a not-replaced package x "less stable" than the target repository and
# b) not provided by:
@@ -282,6 +277,16 @@ fi
printf ' ON `repl_bpir`.`id`=`replaced_bpir`.`id`'
# deliberately break to-be-deleted packages
printf ' AND NOT `repl_bpir`.`is_to_be_deleted`'
+ mysql_join_binary_packages_in_repositories_binary_packages 'repl_bpir' 'repl_bp'
+ mysql_join_binary_packages_build_assignments 'repl_bp' 'repl_ba'
+ # deliberately break packages whose build_assignment was unsuccessfully
+ # built more than a day ago
+ printf ' AND 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`=`repl_ba`.`id`'
+ printf ')'
mysql_join_binary_packages_in_repositories_install_target_providers 'repl_bpir'
mysql_join_binary_packages_in_repositories_repositories 'repl_bpir' 'repl_r'
mysql_join_install_target_providers_dependencies_with_versions
diff --git a/misc/database-layout.dump b/misc/database-layout.dump
index cf75f18..8954513 100644
--- a/misc/database-layout.dump
+++ b/misc/database-layout.dump
@@ -197,6 +197,13 @@ DELETE `replaced_bpir`,`moveable_bpir`
ON `replaced_bpir`.`replaced_by`=`moveable_bpir`.`id`
JOIN `binary_packages_in_repositories` AS `repl_bpir`
ON `repl_bpir`.`id`=`replaced_bpir`.`id` AND NOT `repl_bpir`.`is_to_be_deleted`
+ JOIN `binary_packages` AS `repl_bp`
+ ON `repl_bpir`.`package`=`repl_bp`.`id`
+ JOIN `build_assignments` AS `repl_ba`
+ ON `repl_bp`.`build_assignment`=`repl_ba`.`id` AND NOT EXISTS (
+SELECT 1
+ FROM `failed_builds`
+ WHERE `failed_builds`.`date`<=ADDTIME(NOW(),"-1 00:00:00") AND `failed_builds`.`build_assignment`=`repl_ba`.`id`)
JOIN `install_target_providers`
ON `repl_bpir`.`package`=`install_target_providers`.`package`
JOIN `repositories` AS `repl_r`