diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-06-13 16:59:33 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-06-13 16:59:33 +0200 |
commit | 03754659d6381ac95d4d5e8dc612d3ad6865b581 (patch) | |
tree | 0e7339c5937c5d6e3ce44538ddeb83d1e9cfdcfb | |
parent | 3482cc3995b86f0f053a7e010f82451de292a266 (diff) | |
parent | a3f643fc9d8fc4b45c1bed3cfa8415afb9eb3873 (diff) |
Merge branch 'master' of git://git.kitenet.net/etckeeper into bzrplugin
Conflicts:
debian/changelog
-rw-r--r-- | debian/changelog | 10 | ||||
-rwxr-xr-x | etckeeper | 3 | ||||
-rw-r--r-- | etckeeper.conf | 5 | ||||
-rwxr-xr-x | pre-install.d/50uncommitted-changes | 4 |
4 files changed, 20 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 8ab9a70..e3dd4db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ etckeeper (0.16) UNRELEASED; urgency=low - * Use new API in bzr plugin. + [ Jelmer Vernooij ] + * Use new Bazaar API. + + [ Joey Hess] + * Add a AVOID_COMMIT_BEFORE_INSTALL option in the config file to make it + easy to configure etckeeper to abort an installation if there are + uncommitted changes in /etc. Closes: #478754 - -- Jelmer Vernooij <jelmer@samba.org> Thu, 15 May 2008 19:26:00 +0200 + -- Joey Hess <joeyh@debian.org> Sat, 07 Jun 2008 16:07:09 -0400 etckeeper (0.15) unstable; urgency=low @@ -33,6 +33,9 @@ fi if [ ! -z "$LOWLEVEL_PACKAGE_MANAGER" ]; then export LOWLEVEL_PACKAGE_MANAGER fi +if [ ! -z "$AVOID_COMMIT_BEFORE_INSTALL" ]; then + export AVOID_COMMIT_BEFORE_INSTALL +fi if [ -z "$1" ]; then usage diff --git a/etckeeper.conf b/etckeeper.conf index f7a7ddf..f1438ab 100644 --- a/etckeeper.conf +++ b/etckeeper.conf @@ -12,6 +12,11 @@ VCS="git" # Options passed to bzr commit when run by etckeeper. #BZR_COMMIT_OPTIONS="" +# Uncomment to avoid etckeeper committing existing changes to +# /etc before installation. It will cancel the installation, +# so you can commit the changes by hand. +#AVOID_COMMIT_BEFORE_INSTALL=1 + # The high-level package manager that's being used. HIGHLEVEL_PACKAGE_MANAGER=apt diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes index d06883d..465b06c 100755 --- a/pre-install.d/50uncommitted-changes +++ b/pre-install.d/50uncommitted-changes @@ -10,6 +10,10 @@ if [ "$1" = "fail-debconf" ]; then fi if etckeeper unclean; then + if [ ! "$AVOID_COMMIT_BEFORE_INSTALL" ]; then + echo "error: etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 + exit 1 + fi if ! etckeeper commit "saving uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run"; then if [ -e /usr/share/debconf/confmodule ]; then $0 fail-debconf |