From 526b206f3d9a4b4f890838ca3ae7bc2f1c741cae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 16 May 2010 19:05:03 -0400 Subject: Fix bug where after a large upgrade, etckeeper's automatic commit message was so long it exceeded system limits. Closes: #581678 --- post-install.d/50vcs-commit | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'post-install.d/50vcs-commit') 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 -- cgit v1.2.3