Permalink
Browse files

Fix bug where after a large upgrade, etckeeper's automatic commit mes…

…sage was so long it exceeded system limits. Closes: #581678
  • Loading branch information...
joeyh committed May 16, 2010
1 parent 006900e commit 526b206f3d9a4b4f890838ca3ae7bc2f1c741cae
Showing with 11 additions and 9 deletions.
  1. +2 −0 debian/changelog
  2. +1 −1 etckeeper.spec
  3. +8 −8 post-install.d/50vcs-commit
View
@@ -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
View
@@ -1,5 +1,5 @@
Name: etckeeper
-Version: 0.45
+Version: 0.46
Release: 4%{?dist}
Summary: store /etc in git, mercurial, bzr or darcs
@@ -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

0 comments on commit 526b206

Please sign in to comment.