diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-03-14 01:53:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-03-14 01:53:33 -0400 |
commit | 63dbaa8e2a8bef7413142b108d9bf7a8cd950910 (patch) | |
tree | 724186b6761bf7fea138f014c21ed53045d03e25 | |
parent | 851884c5c24e8314b4e633426dbe88cd9f926096 (diff) |
* Drop the debconf prompt before committing in pre-install.
Closes: #470577, #462161
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/templates | 12 | ||||
-rwxr-xr-x | pre-install.d/50uncommitted-changes | 40 |
3 files changed, 13 insertions, 46 deletions
diff --git a/debian/changelog b/debian/changelog index d95002d..568ffe1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +etckeeper (0.13) UNRELEASED; urgency=low + + * Drop the debconf prompt before committing in pre-install. + Closes: #470577, #462161 + + -- Joey Hess <joeyh@debian.org> Fri, 14 Mar 2008 01:51:53 -0400 + etckeeper (0.12) unstable; urgency=low * Use git ls-files instead of git status. Depend on new enough git for this. diff --git a/debian/templates b/debian/templates index 87f634b..660d594 100644 --- a/debian/templates +++ b/debian/templates @@ -7,18 +7,6 @@ # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. -Template: etckeeper/unclean -Type: boolean -Default: true -#flag:translate!:3 -_Description: Commit changed files in /etc to ${VCS}? - The /etc directory contains uncommitted files - or other changes. It's best for all files in /etc to be committed - to ${VCS} before running APT. Added and changed files listed below can - be committed automatically: - . - ${STATUS} - Template: etckeeper/commit_failed Type: error _Description: Commit failed diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes index 4e573dc..8c0d4d6 100755 --- a/pre-install.d/50uncommitted-changes +++ b/pre-install.d/50uncommitted-changes @@ -9,25 +9,7 @@ status() { fi } -if [ "$1" = "ask-debconf" ]; then - . /usr/share/debconf/confmodule - db_capb escape - db_title etckeeper - - db_reset etckeeper/unclean || true - db_subst etckeeper/unclean VCS "$VCS" - db_subst etckeeper/unclean STATUS $(status | debconf-escape -e) || true - db_input critical etckeeper/unclean || true - db_go || true - db_get etckeeper/unclean - val="$RET" - db_reset etckeeper/unclean || true - if [ "$val" = true ]; then - exit 0 - else - exit 1 - fi -elif [ "$1" = "fail-debconf" ]; then +if [ "$1" = "fail-debconf" ]; then . /usr/share/debconf/confmodule db_subst etckeeper/commit_failed VCS "$VCS" db_input critical etckeeper/commit_failed || true @@ -36,22 +18,12 @@ elif [ "$1" = "fail-debconf" ]; then fi if etckeeper unclean; then - docommit="true" - if [ -e /usr/share/debconf/confmodule ]; then - if $0 ask-debconf; then - docommit=true + 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 else - docommit=false - fi - fi - if [ "$docommit" = true ]; then - 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 - else - echo "error: etckeeper failed to commit changes in /etc using $VCS" - exit 1 - fi + echo "error: etckeeper failed to commit changes in /etc using $VCS" + exit 1 fi fi fi |