r2822 - in glibc-package/trunk/debian: . debhelper.in po
Author: aurel32
Date: 2008-02-26 20:34:16 +0000 (Tue, 26 Feb 2008)
New Revision: 2822
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/debhelper.in/libc.preinst
glibc-package/trunk/debian/debhelper.in/libc.templates
glibc-package/trunk/debian/po/templates.pot
Log:
* debhelper.in/libc.preinst, debhelper.in/libc.templates: debconfize preinst
script.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2008-02-26 19:52:02 UTC (rev 2821)
+++ glibc-package/trunk/debian/changelog 2008-02-26 20:34:16 UTC (rev 2822)
@@ -12,6 +12,8 @@
- script.in/nsscheck.sh: ... this file.
- rules.d/debhelper.mk: Replace NSS_CHECK with code from
script.in/nsscheck.sh.
+ * debhelper.in/libc.preinst, debhelper.in/libc.templates: debconfize preinst
+ script.
* patches/localedata/locale-es_CR.diff: new patch to default to am/pm format
for es_CR locale. Closes: #466482.
Modified: glibc-package/trunk/debian/debhelper.in/libc.preinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.preinst 2008-02-26 19:52:02 UTC (rev 2821)
+++ glibc-package/trunk/debian/debhelper.in/libc.preinst 2008-02-26 20:34:16 UTC (rev 2822)
@@ -43,56 +43,63 @@
if [ -e /var/run/utmpd.rw ]; then rm -f /var/run/utmpd.rw; fi
fi
+ # Load debconf module if available
+ if [ -f /usr/share/debconf/confmodule ] ; then
+ . /usr/share/debconf/confmodule
+ fi
# NSS authentication trouble guard
if dpkg --compare-versions $2 lt 2.6-1; then
- check="xdm kdm gdm postgresql xscreensaver proftpd"
+
+ check="gdm kdm proftpd postgresql xscreensaver xdm"
# NSS services check: NSS_CHECK
- echo
- echo "Name Service Switch update in the C Library: pre-installation question."
- echo
- echo "Running services and programs that are using NSS need to be restarted,"
- echo "otherwise they might not be able to do lookup or authentication any more."
- echo "The installation process is able to restart some services (such as ssh or"
- echo "telnetd), but other programs cannot be restarted automatically. One such"
- echo "program that needs manual stopping and restart after the glibc upgrade by"
- echo "yourself is xdm - because automatic restart might disconnect your active"
- echo "X11 sessions."
- echo
- echo "Known packages that need to be stopped before the glibc upgrade are:"
- echo " $check"
- echo
+ if [ -n "$services" ]; then
+ if [ -f /usr/share/debconf/confmodule ] ; then
+ db_version 2.0
+ db_reset glibc/upgrade
+ db_subst glibc/upgrade services $services
+ db_input critical glibc/upgrade || true
+ db_go || true
+ db_get glibc/upgrade
+ answer=$RET
+ else
+ echo "Name Service Switch update in the GNU C Library"
+ echo
+ echo "Running services and programs that are using NSS need to be restarted,"
+ echo "otherwise they might not be able to do lookup or authentication any more."
+ echo "The installation process is able to restart some services (such as ssh or"
+ echo "telnetd), but other programs cannot be restarted automatically. One such"
+ echo "program that needs manual stopping and restart after the glibc upgrade by"
+ echo "yourself is xdm - because automatic restart might disconnect your active"
+ echo "X11 sessions."
+ echo
+ echo "This script detected the following installed services which must be"
+ echo "stopped before the upgrade: $services"
+ echo
+ echo "If you want to interrupt the upgrade now and continue later, please"
+ echo "answer No to the question below."
+ echo
+ frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+ if [ "$frontend" = noninteractive ]; then
+ echo "Non-interactive mode, upgrade glibc forcibly"
+ answer=true
+ else
+ echo -n "Do you want to upgrade glibc now? [Y/n] "
+ read answer
+ case $answer in
+ Y*|y*) answer=true ;;
+ N*|n*) answer=false ;;
+ *) answer=true ;;
+ esac
+ fi
+ echo
+ fi
- if [ -n "$services" ]; then
- echo "This script detected the following installed services which must be"
- echo "stopped before the upgrade:"
- echo " $services"
- else
- echo "This script did not detect any installed services which need to be"
- echo "stopped."
+ if [ "x$answer" != "xtrue" ]; then
+ echo "Stopped glibc upgrade. Please retry the upgrade after you have"
+ echo "checked or stopped services by hand."
+ exit 1
+ fi
fi
- echo
- echo "If you want to interrupt the upgrade now and continue later, please"
- echo "answer No to the question below."
- echo
- frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
- if [ "$frontend" = noninteractive ]; then
- echo "Non-interactive mode, upgrade glibc forcibly"
- answer=yes
- else
- echo -n "Do you want to upgrade glibc now? [Y/n] "
- read answer
- case $answer in
- Y*|y*) answer=yes ;;
- N*|n*) answer=no ;;
- *) answer=yes ;;
- esac
- fi
- echo
- if [ "$answer" = no ]; then
- echo "Stopped glibc upgrade. Please retry the upgrade after you have"
- echo "checked or stopped services by hand."
- exit 1
- fi
fi
# This will keep us from using hwcap libs (optimized) during an
Modified: glibc-package/trunk/debian/debhelper.in/libc.templates
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.templates 2008-02-26 19:52:02 UTC (rev 2821)
+++ glibc-package/trunk/debian/debhelper.in/libc.templates 2008-02-26 20:34:16 UTC (rev 2822)
@@ -1,3 +1,21 @@
+Template: glibc/upgrade
+Type: boolean
+Default: true
+_Description: Do you want to upgrade glibc now?
+ Running services and programs that are using NSS need to be restarted,
+ otherwise they might not be able to do lookup or authentication any more.
+ The installation process is able to restart some services (such as ssh or
+ telnetd), but other programs cannot be restarted automatically. One such
+ program that needs manual stopping and restart after the glibc upgrade by
+ yourself is xdm - because automatic restart might disconnect your active
+ X11 sessions.
+ .
+ This script detected the following installed services which must be
+ stopped before the upgrade: ${services}
+ .
+ If you want to interrupt the upgrade now and continue later, please
+ answer No to the question below.
+
Template: glibc/restart-services
Type: string
_Description: Services to restart for GNU libc library upgrade:
Modified: glibc-package/trunk/debian/po/templates.pot
===================================================================
--- glibc-package/trunk/debian/po/templates.pot 2008-02-26 19:52:02 UTC (rev 2821)
+++ glibc-package/trunk/debian/po/templates.pot 2008-02-26 20:34:16 UTC (rev 2822)
@@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: debian-glibc@lists.debian.org\n"
-"POT-Creation-Date: 2007-09-10 10:19+0200\n"
+"Report-Msgid-Bugs-To: glibc@packages.debian.org\n"
+"POT-Creation-Date: 2008-02-24 23:29+0100\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"
@@ -78,7 +78,7 @@
#. Type: string
#. Description
#: ../debhelper.in/libc.templates:1001
-msgid "Services to restart for GNU libc library upgrade:"
+msgid "Do you want to upgrade glibc now?"
msgstr ""
#. Type: string
@@ -86,6 +86,41 @@
#: ../debhelper.in/libc.templates:1001
msgid ""
"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
"otherwise they might not be able to do lookup or authentication any more "
"(for services such as ssh, this can affect your ability to login). Please "
"review the following space-separated list of init.d scripts for services to "
@@ -94,20 +129,20 @@
#. Type: string
#. Description
-#: ../debhelper.in/libc.templates:1001
+#: ../debhelper.in/libc.templates:2001
msgid ""
"Note: restarting sshd/telnetd should not affect any existing connections."
msgstr ""
#. Type: error
#. Description
-#: ../debhelper.in/libc.templates:2001
+#: ../debhelper.in/libc.templates:3001
msgid "Failure restarting some services for GNU libc upgrade"
msgstr ""
#. Type: error
#. Description
-#: ../debhelper.in/libc.templates:2001
+#: ../debhelper.in/libc.templates:3001
msgid ""
"The following services could not be restarted for the GNU libc library "
"upgrade:"
@@ -115,7 +150,7 @@
#. Type: error
#. Description
-#: ../debhelper.in/libc.templates:2001
+#: ../debhelper.in/libc.templates:3001
msgid ""
"You will need to start these manually by running '/etc/init.d/<service> "
"start'."
Reply to: