summaryrefslogtreecommitdiff
path: root/post-install.d
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-03-25 20:53:02 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-03-25 20:53:02 -0400
commitb4b7c0996c73291b34f0566f74ad2513c44a6371 (patch)
treee1c15d4975fb7b813b044ee943b93b373a5c2352 /post-install.d
parentda1632bd6dca9b3ba46ab74809e409a74dd99a24 (diff)
Keep track of what packages change state during an installation, and include that in the commit message at the end.
Diffstat (limited to 'post-install.d')
-rwxr-xr-xpost-install.d/50vcs-commit13
1 files changed, 12 insertions, 1 deletions
diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit
index 581e310..76fb668 100755
--- a/post-install.d/50vcs-commit
+++ b/post-install.d/50vcs-commit
@@ -1,6 +1,17 @@
#!/bin/sh
set -e
+
+pl="/var/cache/etckeeper/packagelist"
+NL="
+"
if etckeeper unclean; then
- etckeeper commit "committing changes after $HIGHLEVEL_PACKAGE_MANAGER run"
+ message="committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run"
+
+ if [ -e $pl.pre-install ]; then
+ message="$message$NL$(etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4)"
+ rm -f $pl.pre-install
+ fi
+
+ etckeeper commit "$(printf "$message")"
fi