[Piuparts-commits] [piuparts] 03/04: reschedule_oldest_logs: expiration age can be relative
Holger Levsen
holger at layer-acht.org
Thu Aug 3 03:52:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 9223b8a4789d54e22d097af1e31e8903ac6ea0a4
Author: Andreas Beckmann <anbe at debian.org>
Date: Thu Aug 3 03:08:39 2017 +0200
reschedule_oldest_logs: expiration age can be relative
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
README_server.txt | 8 +++++---
debian/changelog | 2 ++
master-bin/reschedule_oldest_logs.in | 6 ++++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/README_server.txt b/README_server.txt
index ec85585..cc564b6 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -516,7 +516,7 @@ section, too, and will serve as defaults for all other sections
that are actually testable will be reissued by piuparts-master (and
the "old" log will be deleted at that time). Logs that are marked
for recycling but have not been rechecked due to missing/failing
- dependecies will be deleted anyway if they are older than
+ dependencies will be deleted anyway if they are older than
expire-(old|fail)-days.
* "reschedule-old-count" (global, section) is the maximum number of
@@ -526,7 +526,8 @@ section, too, and will serve as defaults for all other sections
* "expire-old-days" (global, section) can be set to a value larger
than 'reschedule-old-days' to delete logs older than the setting
that are marked for recycling but haven't been rechecked due to
- failing or missing dependecies. Disabled by default ("0").
+ failing or missing dependencies. A value starting with "+" is
+ relative to 'reschedule-old-days'. Disabled by default ("0").
* "reschedule-fail-days" (global, section) sets the minimum age of
failing logs (fail/*.log or affected/*.log) before they will be
@@ -539,7 +540,8 @@ section, too, and will serve as defaults for all other sections
* "expire-fail-days" (global, section) can be set to a value larger
than 'reschedule-fail-days' to delete logs older than the setting
that are marked for recycling but haven't been rechecked due to
- failing or missing dependecies. Disabled by default ("0").
+ failing or missing dependencies. A value starting with "+" is
+ relative to 'reschedule-fail-days'. Disabled by default ("0").
* "auto-reschedule" (section) can be set to "no" to disable
rescheduling of passed and failed packages. To disable only
diff --git a/debian/changelog b/debian/changelog
index e4af215..54df909 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ piuparts (0.79) UNRELEASED; urgency=medium
- Do not ignore errors while purging packages.
- Add post_test_* custom scripts. These are run exactly once at the end
of each test (before comparing with the reference chroot state).
+ * reschedule_oldest_logs: Expiration age values starting with "+" are
+ relative to the rescheduling age.
* Move some exceptions to {pre,post}_test_exceptions.
* scripts/post_distupgrade_base_cleanup: Remove pinentry-curses from the
stretch (--install-recommends) reference chroot.
diff --git a/master-bin/reschedule_oldest_logs.in b/master-bin/reschedule_oldest_logs.in
index 3effe9f..44cd525 100755
--- a/master-bin/reschedule_oldest_logs.in
+++ b/master-bin/reschedule_oldest_logs.in
@@ -119,11 +119,17 @@ for SECTION in $SECTIONS ; do
get_config_value _FAIL_COUNT $SECTION reschedule-fail-count $FAIL_COUNT
# FIXME: we ignore bugged here - ptyhon-bts is really the way to go
>$UNSORTED
+ case $_EXPIRE_AGE in
+ +*) _EXPIRE_AGE=$(($_AGE$_EXPIRE_AGE)) ;;
+ esac
if [ "$_EXPIRE_AGE" -gt "$_AGE" ]; then
if [ -n "$recycle_was_idle" ]; then
list_logs $_EXPIRE_AGE $_COUNT pass fail affected >> $UNSORTED
fi
fi
+ case $_EXPIRE_FAIL_AGE in
+ +*) _EXPIRE_FAIL_AGE=$(($_FAIL_AGE$_EXPIRE_FAIL_AGE)) ;;
+ esac
if [ "$_EXPIRE_FAIL_AGE" -gt "$_FAIL_AGE" ]; then
list_logs $_EXPIRE_FAIL_AGE $_FAIL_COUNT fail affected >> $UNSORTED
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list