From b4b7c0996c73291b34f0566f74ad2513c44a6371 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Mar 2008 20:53:02 -0400 Subject: Keep track of what packages change state during an installation, and include that in the commit message at the end. --- post-install.d/50vcs-commit | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'post-install.d/50vcs-commit') 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 -- cgit v1.2.3