summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-16 19:05:03 -0400
committerJoey Hess <joey@kitenet.net>2010-05-16 19:05:03 -0400
commit526b206f3d9a4b4f890838ca3ae7bc2f1c741cae (patch)
tree16ee2ea7bf4308bbe06652c5646375729d791189
parent006900e5fa3457c5f5eb8d2f3aeb039cde0a593c (diff)
Fix bug where after a large upgrade, etckeeper's automatic commit message was so long it exceeded system limits. Closes: #581678
-rw-r--r--debian/changelog2
-rw-r--r--etckeeper.spec2
-rwxr-xr-xpost-install.d/50vcs-commit16
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