From: Joachim Breitner <[email protected]> when not allowing installation due to them. (Closes: #535082) --- debian/changelog | 5 +++++ etckeeper.8 | 3 +++ pre-install.d/50uncommitted-changes | 3 ++- status.d/50test | 12 ++++++++++++ status.d/README | 2 ++ 5 files changed, 24 insertions(+), 1 deletions(-) create mode 100755 status.d/50test create mode 100644 status.d/README
diff --git a/debian/changelog b/debian/changelog index b80418b..ffd51d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ etckeeper (0.38) UNRELEASED; urgency=low + [ Joey Hess ] * Use hostname if hostname -f fails. Closes: #533295 + [ Joachim Breitner ] + * List uncommitted changes when not allowing installation due to them. + (Closes: #535082) + -- Joey Hess <[email protected]> Sun, 28 Jun 2009 16:29:17 -0400 etckeeper (0.37) unstable; urgency=low diff --git a/etckeeper.8 b/etckeeper.8 index 9070503..b4ab231 100644 --- a/etckeeper.8 +++ b/etckeeper.8 @@ -36,6 +36,9 @@ This is called by apt's DPkg::Post-Invoke hook, or by equivilant hooks of other package managers. It commits changes made by packages into the repository. (You can also call this by hand after running dpkg by hand.) .TP +.B status +This lists uncommitted changes in the directory. +.TP .B unclean This returns true if the directory contains uncommitted changes. .TP diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes index 47750ac..4166a0e 100755 --- a/pre-install.d/50uncommitted-changes +++ b/pre-install.d/50uncommitted-changes @@ -12,7 +12,8 @@ fi if etckeeper unclean; then if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then echo "" >&2 - echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run" >&2 + echo "** etckeeper detected uncommitted changes in /etc prior to $HIGHLEVEL_PACKAGE_MANAGER run:" >&2 + etckeeper status echo "** Aborting $HIGHLEVEL_PACKAGE_MANAGER run. Manually commit and restart." >&2 echo "" >&2 exit 1 diff --git a/status.d/50test b/status.d/50test new file mode 100755 index 0000000..aa4be12 --- /dev/null +++ b/status.d/50test @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$VCS" = git ]; then + [ -d .git ] && git status +elif [ "$VCS" = hg ]; then + [ -d .hg ] && hg status +elif [ "$VCS" = bzr ]; then + [ -d .bzr ] && bzr status +elif [ "$VCS" = darcs ]; then + [ -d _darcs ] && darcs whatsnew -l +fi diff --git a/status.d/README b/status.d/README new file mode 100644 index 0000000..cd23058 --- /dev/null +++ b/status.d/README @@ -0,0 +1,2 @@ +Files in this directory are used to list uncommitted +changes in the working copy. -- 1.6.3.1 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

