Package: etckeeper
Version: 0.11
Followup-For: Bug #459384
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu hardy ubuntu-patch
The attached patch, extracted from the patch provided by Mark A.
Hershberger at https://launchpad.net/bugs/189293 adds the command which
has been run (for "apt") to the commit message.
The approach is similar to the one documented on
http://michael-prokop.at/blog/2007/03/14/maintain-etc-with-mercurial-on-debian/
(for getting $caller)
diff -Nru /tmp/uHPK7ZtLRx/etckeeper-0.11/post-install.d/50vcs-commit
/tmp/DW4getYeCQ/etckeeper-0.11ubuntu1~blueyedppa1/post-install.d/50vcs-commit
--- etckeeper-0.11/post-install.d/50vcs-commit 2008-01-15 20:01:19.000000000
+0100
+++ etckeeper-0.11ubuntu1~blueyedppa1/post-install.d/50vcs-commit
2008-03-07 02:29:49.000000000 +0100
@@ -1,6 +1,12 @@
#!/bin/sh
set -e
+cmd_line=""
+if [ "$HIGHLEVEL_PACKAGE_MANAGER" = "apt" ]; then
+ caller=$(ps axww | awk '/aptitude|apt-get/ {for (i=5; i<=NF ; i++) printf
("%s ",$i); printf ("\n") }' | head -1)
+ cmd_line=": $caller"
+fi
+
if etckeeper unclean; then
- etckeeper commit "committing changes after $HIGHLEVEL_PACKAGE_MANAGER
run"
+ etckeeper commit "committing changes after $HIGHLEVEL_PACKAGE_MANAGER
run$cmd_line"
fi
diff -Nru /tmp/uHPK7ZtLRx/etckeeper-0.11/pre-install.d/50uncommitted-changes
/tmp/DW4getYeCQ/etckeeper-0.11ubuntu1~blueyedppa1/pre-install.d/50uncommitted-changes
--- etckeeper-0.11/pre-install.d/50uncommitted-changes 2008-01-15
20:01:49.000000000 +0100
+++ etckeeper-0.11ubuntu1~blueyedppa1/pre-install.d/50uncommitted-changes
2008-03-07 02:36:03.000000000 +0100
@@ -6,9 +6,17 @@
git status
elif [ "$VCS" = hg ]; then
hg status
fi
}
+cmd_line=""
+if [ "$HIGHLEVEL_PACKAGE_MANAGER" = "apt" ]; then
+ caller=$(ps axww | awk '/aptitude|apt-get/ {for (i=5; i<=NF ; i++) printf
("%s ",$i); printf ("\n") }' | head -1)
+ cmd_line=": $caller"
+fi
+
if [ "$1" = "ask-debconf" ]; then
. /usr/share/debconf/confmodule
db_capb escape
@@ -45,7 +53,7 @@
fi
fi
if [ "$docommit" = true ]; then
- if ! etckeeper commit "saving uncommitted changes in /etc prior
to $HIGHLEVEL_PACKAGE_MANAGER run"; then
+ if ! etckeeper commit "saving uncommitted changes in /etc prior
to $HIGHLEVEL_PACKAGE_MANAGER run$cmd_line"; then
if [ -e /usr/share/debconf/confmodule ]; then
$0 fail-debconf
else