Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/db-update21
-rwxr-xr-xconf/master.conf.example4
-rwxr-xr-xlib/load-configuration4
3 files changed, 29 insertions, 0 deletions
diff --git a/bin/db-update b/bin/db-update
index f09db2d..0f261fa 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -117,6 +117,27 @@ if ! ${no_action}; then
>&2 echo 'come back (shortly) later - sanity-check currently running.'
exit 0
fi
+
+ # shellcheck disable=SC2016
+ {
+ printf 'UPDATE `binary_packages`'
+ printf ' JOIN ('
+ printf 'SELECT `binary_packages_in_repositories`.`package`,'
+ printf 'MIN(`binary_packages_in_repositories`.`last_moved`) AS `first_last_moved`'
+ printf ' FROM `binary_packages_in_repositories`'
+ printf ' GROUP BY `binary_packages_in_repositories`.`package`'
+ printf ') AS `binary_packages_in_repositories`'
+ printf ' ON `binary_packages_in_repositories`.`package`=`binary_packages`.`id`'
+ printf ' SET `binary_packages`.`is_tested`=1'
+ printf ' WHERE NOT `binary_packages`.`has_issues`'
+ printf ' AND NOT `binary_packages`.`is_tested`'
+ printf ' AND `binary_packages_in_repositories`.`first_last_moved`<ADDDATE(NOW(),from_base64("%s"))' \
+ "$(
+ printf -- '-%s' "${max_testing_duration}" | \
+ base64 -w0
+ )"
+ } | \
+ mysql_run_query
fi
# Create tmp_dir and trap.
diff --git a/conf/master.conf.example b/conf/master.conf.example
index 488f7ce..2eafb88 100755
--- a/conf/master.conf.example
+++ b/conf/master.conf.example
@@ -37,3 +37,7 @@
#build_list_lock_file="${work_dir}/build-list.lock"
#sanity_check_lock_file="${work_dir}/sanity-check.lock"
#package_database_lock_file="${work_dir}/package-database.lock"
+
+# how long should packages be in [community-testing]/[testing] before
+# automatically being marked as tested
+#max_testing_duration="14 00:00:00"
diff --git a/lib/load-configuration b/lib/load-configuration
index 8f7b86b..d54d8b5 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -90,6 +90,10 @@ mirror_refresh_trigger_urls=''
# command to access the mysql database
mysql_command='mysql buildmaster'
+# how long should packages be in [community-testing]/[testing] before
+# automatically being marked as tested
+max_testing_duration="14 00:00:00"
+
# possibly pull in custom modifications
if [ -r "${base_dir}/conf/common.conf" ]; then