From ef40561a3c463328e86d94397df1e88372778c49 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 19 Jul 2018 10:02:18 +0200 Subject: mark packages without bug reports as tested after some time (default: 2 weeks) --- bin/db-update | 21 +++++++++++++++++++++ conf/master.conf.example | 4 ++++ lib/load-configuration | 4 ++++ 3 files changed, 29 insertions(+) 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`