diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-01-31 14:42:15 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-01-31 14:42:15 -0500 |
commit | 2890e88e8b8ddeba83bc371518ccdbe459f0328e (patch) | |
tree | 1ceadb3dcc1f76648cb533a07a3406a4e4ca74ac /debian | |
parent | 3371831548da8bacd2a7245252a6a151b30060bb (diff) |
Prevent cron job autocommit from happening if pre-install file is present, to avoid committing state in the middle of an apt run. Closes: #567538
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/cron.daily | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index e77c675..0a5b1b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ etckeeper (0.43) UNRELEASED; urgency=low * Fix cleanup of /var/cache/etckeeper/packagelist.pre-install after an upgrade where no conffiles are changed. + * Prevent cron job autocommit from happening if pre-install file + is present, to avoid committing state in the middle of an apt run. + Closes: #567538 -- Joey Hess <joeyh@debian.org> Sun, 31 Jan 2010 14:36:44 -0500 diff --git a/debian/cron.daily b/debian/cron.daily index 78e66e4..e83b570 100644 --- a/debian/cron.daily +++ b/debian/cron.daily @@ -3,8 +3,11 @@ set -e if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then - if etckeeper unclean; then - etckeeper commit "daily autocommit" >/dev/null + # avoid autocommit if an install run is in progress + if [ ! -e /var/cache/etckeeper/packagelist.pre-install ]; then + if etckeeper unclean; then + etckeeper commit "daily autocommit" >/dev/null + fi fi fi fi |