diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | etckeeper.spec | 2 | ||||
-rwxr-xr-x | post-install.d/50vcs-commit | 16 |
3 files changed, 11 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog index 6e13604..1fab0e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ etckeeper (0.46) UNRELEASED; urgency=low * Support etckeeper commit --stdin + * Fix bug where after a large upgrade, etckeeper's automatic commit message + was so long it exceeded system limits. Closes: #581678 -- Joey Hess <joeyh@debian.org> Sun, 16 May 2010 18:56:35 -0400 diff --git a/etckeeper.spec b/etckeeper.spec index 74bdedd..01611b8 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -1,5 +1,5 @@ Name: etckeeper -Version: 0.45 +Version: 0.46 Release: 4%{?dist} Summary: store /etc in git, mercurial, bzr or darcs diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit index 6cb6bd1..7710c4a 100755 --- a/post-install.d/50vcs-commit +++ b/post-install.d/50vcs-commit @@ -2,20 +2,20 @@ set -e pl="/var/cache/etckeeper/packagelist" -NL=" -" if etckeeper unclean; then message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run" if [ -e $pl.pre-install ]; then - diff="$(etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]')" || true - if [ -n "$diff" ]; then - message="$message$NL${NL}Package changes:$NL$diff" - fi + ( + echo "$message" + echo + echo "Package changes:" + etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]' || true + ) | etckeeper commit --stdin + else + etckeeper commit "$(printf "$message")" fi - - etckeeper commit "$(printf "$message")" fi if [ -e $pl.pre-install ]; then |