use template for confirm q
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2012 02:49:47 +0000 (02:49 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 10 Jan 2012 02:49:47 +0000 (02:49 +0000)
debian/po/templates.pot
debian/xfonts-traditional.prerm
debian/xfonts-traditional.templates

index 8c1b962..1ba57d7 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: xfonts-traditional@packages.debian.org\n"
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: xfonts-traditional@packages.debian.org\n"
-"POT-Creation-Date: 2012-01-10 00:59+0000\n"
+"POT-Creation-Date: 2012-01-10 02:36+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -59,8 +59,8 @@ msgstr ""
 #: ../xfonts-traditional.templates:2001
 msgid ""
 "If you approve, I will edit /etc/X11/app-default/XTerm for you, and save "
 #: ../xfonts-traditional.templates:2001
 msgid ""
 "If you approve, I will edit /etc/X11/app-default/XTerm for you, and save "
-"your old file as XTerm.not-trad.  (Note that this is a conffile so you may "
-"get prompts from dpkg about it in the future.)"
+"your old file as XTerm.backup.not-trad.  (Note that this is a conffile so "
+"you may get prompts from dpkg about it in the future.)"
 msgstr ""
 
 #. Type: boolean
 msgstr ""
 
 #. Type: boolean
@@ -97,9 +97,8 @@ msgstr ""
 #: ../xfonts-traditional.templates:3001
 msgid ""
 "If you approve, I will edit /etc/X11/fonts/misc/xfonts-base.alias for you, "
 #: ../xfonts-traditional.templates:3001
 msgid ""
 "If you approve, I will edit /etc/X11/fonts/misc/xfonts-base.alias for you, "
-"and save your old file as xfonts-base.alias.not-trad.  (Note that this is a "
-"conffile so you may get prompts from dpkg about it in the future.)  This "
-"will also make the xfonts-traditional package harder to safely remove."
+"and save your old file as xfonts-base.alias.backup.not-trad. (Note that this "
+"is a conffile so you may get prompts from dpkg about it in the future.)"
 msgstr ""
 
 #. Type: boolean
 msgstr ""
 
 #. Type: boolean
@@ -114,6 +113,29 @@ msgstr ""
 #. Description
 #: ../xfonts-traditional.templates:3001
 msgid ""
 #. Description
 #: ../xfonts-traditional.templates:3001
 msgid ""
-"To revert the change to the default, simply change the alias fixed back from "
-"\"-trad-...\"  to \"-misc-...\", or rename the old file back into place."
+"To revert the change to the default, simply change the alias \"fixed\" back "
+"from \"-trad-...\"  to \"-misc-...\", or rename the old file back into place."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../xfonts-traditional.templates:4001
+msgid "Remove anyway, breaking \"fixed\" and your X server?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../xfonts-traditional.templates:4001
+msgid ""
+"Removing xfonts-traditional would break your X server by removing \"fixed\"."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../xfonts-traditional.templates:4001
+msgid ""
+"You should not remove xfonts-traditional while \"fixed\" refers to one of "
+"its fonts.  You probably want to check the differences between the various /"
+"etc/X11/fonts/misc/xfonts-base.alias*, reconcile any changes, and then run "
+"\"update-fonts-alias misc\".  After that you can retry the removal."
 msgstr ""
 msgstr ""
index 53687d7..7578f52 100755 (executable)
@@ -16,23 +16,17 @@ remove)
        if grep '^fixed[         ][      ]*-trad-' \
                        /etc/X11/fonts/misc/xfonts-base.alias \
                        /usr/share/fonts/X11/misc/fonts.alias; then
        if grep '^fixed[         ][      ]*-trad-' \
                        /etc/X11/fonts/misc/xfonts-base.alias \
                        /usr/share/fonts/X11/misc/fonts.alias; then
-               cat >&2 <<'END'
-
-Removing xfonts-traditional would break your X server by removing "fixed".
-
-You should not remove xfonts-traditional while "fixed" refers to one
-of its fonts.  You probably want to check the differences between the
-various /etc/X11/fonts/misc/xfonts-base.alias*, reconcile any changes,
-and then run "update-fonts-alias misc".  After that you can retry the
-removal.
-
-END
-               printf 'Continue anyway ? [n/y] '
-               read x </dev/tty
-               case "$x" in
-               y*|Y*)  ;;
-               *)      exit 1 ;;
-               esac
+
+               RET=''
+               db_input critical xfonts-traditional/confirm-break-remove ||:
+               db_go ||:
+               db_get xfonts-traditional/confirm-break-remove ||:
+               if [ x$RET != xtrue ]; then
+                       db_fset xfonts-traditional/confirm-break-remove \
+                               seen false ||:
+                       echo 'Aborting to avoid breaking "fixed".' >&2
+                       exit 1
+               fi
        fi
 
        for d in /usr/share/fonts/X11 /usr/local/share/fonts/X11; do
        fi
 
        for d in /usr/share/fonts/X11 /usr/local/share/fonts/X11; do
index 6554551..bc45d6f 100644 (file)
@@ -45,3 +45,15 @@ _Description: Configure system to use traditional "fixed"?
  To revert the change to the default, simply change the alias "fixed"
  back from "-trad-..."  to "-misc-...", or rename the old file back
  into place.
  To revert the change to the default, simply change the alias "fixed"
  back from "-trad-..."  to "-misc-...", or rename the old file back
  into place.
+
+Template: xfonts-traditional/confirm-break-remove
+Type: boolean
+Default: false
+_Description: Remove anyway, breaking "fixed" and your X server?
+ Removing xfonts-traditional would break your X server by removing "fixed".
+ .
+ You should not remove xfonts-traditional while "fixed" refers to one
+ of its fonts.  You probably want to check the differences between the
+ various /etc/X11/fonts/misc/xfonts-base.alias*, reconcile any changes,
+ and then run "update-fonts-alias misc".  After that you can retry the
+ removal.