diff options
author | Joey Hess <joey@kitenet.net> | 2010-05-16 19:05:03 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-05-16 19:05:03 -0400 |
commit | 526b206f3d9a4b4f890838ca3ae7bc2f1c741cae (patch) | |
tree | 16ee2ea7bf4308bbe06652c5646375729d791189 /post-install.d/50vcs-commit | |
parent | 006900e5fa3457c5f5eb8d2f3aeb039cde0a593c (diff) |
Fix bug where after a large upgrade, etckeeper's automatic commit message was so long it exceeded system limits. Closes: #581678
Diffstat (limited to 'post-install.d/50vcs-commit')
-rwxr-xr-x | post-install.d/50vcs-commit | 16 |
1 files changed, 8 insertions, 8 deletions
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 |