From 5fec4bfafd215d930b3fee0b35d4e8cb3942c8b4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Sep 2014 15:46:58 -0400 Subject: let's not use debconf to display a possibly minor warning --- debian/changelog | 9 ++++++--- debian/templates | 8 -------- post-install.d/50vcs-commit | 17 +---------------- pre-install.d/50uncommitted-changes | 17 +---------------- 4 files changed, 8 insertions(+), 43 deletions(-) diff --git a/debian/changelog b/debian/changelog index e11e941..ca4ce2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ etckeeper (1.14) UNRELEASED; urgency=medium - * Use debconf for prompting when post-install commit fails, as was - already done for pre-install commit. This avoids propigating - errors to apt when eg, git is misconfigured and cannot commit. + * Handle failure to commit in post-install, pre-install by showing a + warning, rather than propigating the error to apt. + This avoids breaking the apt run when eg, git is misconfigured and + cannot commit. + pre-install already did this when it was able to use debconf to display a + message, but now debconf is not used, and it always behaves this way. Closes: #760011 -- Joey Hess Thu, 04 Sep 2014 15:41:39 -0400 diff --git a/debian/templates b/debian/templates index 2cec92c..96f5c44 100644 --- a/debian/templates +++ b/debian/templates @@ -7,14 +7,6 @@ # Even minor modifications require translation updates and such # changes should be coordinated with translators and reviewers. -Template: etckeeper/commit_failed -Type: error -_Description: Commit failed - An attempt to commit /etc changes to ${VCS} failed. - . - You may manually resolve the issues with the uncommitted changes - before continuing. - Template: etckeeper/purge Type: boolean Default: true diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit index edd3444..36f3ee4 100755 --- a/post-install.d/50vcs-commit +++ b/post-install.d/50vcs-commit @@ -1,16 +1,6 @@ #!/bin/sh set -e -if [ "$1" = "fail-debconf" ]; then - . /usr/share/debconf/confmodule - db_title etckeeper - db_subst etckeeper/commit_failed VCS "$VCS" - db_input critical etckeeper/commit_failed || true - db_go || true - db_reset etckeeper/commit_failed || true - exit 0 -fi - pl="/var/cache/etckeeper/packagelist" if etckeeper unclean; then @@ -31,12 +21,7 @@ if etckeeper unclean; then set -e if [ "$status" != 0 ]; 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 "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 fi fi diff --git a/pre-install.d/50uncommitted-changes b/pre-install.d/50uncommitted-changes index ef3fbf1..969d341 100755 --- a/pre-install.d/50uncommitted-changes +++ b/pre-install.d/50uncommitted-changes @@ -1,16 +1,6 @@ #!/bin/sh set -e -if [ "$1" = "fail-debconf" ]; then - . /usr/share/debconf/confmodule - db_title etckeeper - db_subst etckeeper/commit_failed VCS "$VCS" - db_input critical etckeeper/commit_failed || true - db_go || true - db_reset etckeeper/commit_failed || true - exit 0 -fi - if etckeeper unclean; then if [ "$AVOID_COMMIT_BEFORE_INSTALL" = 1 ]; then echo "" >&2 @@ -20,11 +10,6 @@ if etckeeper unclean; then 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 - else - echo "error: etckeeper failed to commit changes in /etc using $VCS" - exit 1 - fi + echo "warning: etckeeper failed to commit changes in /etc using $VCS" >&2 fi fi -- cgit v1.2.3