Bug#519420: (no subject)

2009-03-25 Thread Martin Meredith
I believe this can be done with bzr + etckeeper.

Just change /etc/etckeeper/etckeeper.conf to have

BZR_COMMIT_OPTIONS=--unchanged

instead of

#BZR_COMMIT_OPTIONS=




signature.asc
Description: Digital signature


Bug#519420: (no subject)

2009-03-25 Thread Martin Meredith
Oh, actually, that won't work as the package stands. I'll write a patch though, 
as this is probably useful. Though - I'd only know how to fix this in bzr, not 
others.


signature.asc
Description: Digital signature


Bug#519420: (no subject)

2009-03-25 Thread Martin Meredith
tags 519420 +patch
thanks

Attached is a patch to do this. However, this will only work for bzr. It is 
also 
untested.
diff -Naur etckeeper-0.34.old/etckeeper.conf etckeeper-0.34/etckeeper.conf
--- etckeeper-0.34.old/etckeeper.conf	2009-02-25 19:28:52.0 +
+++ etckeeper-0.34/etckeeper.conf	2009-03-25 19:36:02.0 +
@@ -32,3 +32,6 @@
 # The low-level package manager that's being used.
 # (dpkg, rpm, pacman-g2, etc)
 LOWLEVEL_PACKAGE_MANAGER=dpkg
+
+# Uncomment the below to always commit after an install (bzr only)
+#FORCE_COMMIT_AFTER_INSTALL=1
diff -Naur etckeeper-0.34.old/post-install.d/50vcs-commit etckeeper-0.34/post-install.d/50vcs-commit
--- etckeeper-0.34.old/post-install.d/50vcs-commit	2008-12-16 23:14:38.0 +
+++ etckeeper-0.34/post-install.d/50vcs-commit	2009-03-25 20:04:15.0 +
@@ -5,9 +5,13 @@
 NL=
 
 
-if etckeeper unclean; then
+if etckeeper unclean || [ ! -z $FORCE_COMMIT_AFTER_INSTALL ]; then
 	message=committing changes in /etc after $HIGHLEVEL_PACKAGE_MANAGER run
-
+	
+	if [ ! -z $FORCE_COMMIT_AFTER_INSTALL -a $VCS = bzr ]; then
+		export BZR_COMMIT_OPTIONS=$BZR_COMMIT_OPTIONS --unchanged
+	fi
+	
 	if [ -e $pl.pre-install ]; then
 		diff=$(etckeeper list-installed | diff -U0 $pl.pre-install - | tail -n+4 | egrep '^[-+]') || true
 		if [ -n $diff ]; then


signature.asc
Description: Digital signature