Re: plan of next upload
From: Atsuhito Kohda <kohda@pm.tokushima-u.ac.jp>
Subject: Re: plan of next upload
Date: Tue, 04 Nov 2003 14:42:32 +0900 (JST)
> + DEFAULT_ANS=`echo -n $DEFAULTS_MERGED | tr -d ',' | tr ' ' '\n' | sort -u | tr '\n' ',' | sed 's/,$//'`
It seemed this failed to set default value for tetex-bin/hyphen
because generated DEFAULT_ANS was in a form (for example)
french[=patois],ngerman[=naustrian-neue_Rechtschreibung]
but it should be in a form
french[=patois], ngerman[=naustrian-neue_Rechtschreibung]
(note space after comma!)
With the former value of DEFAULT_ANS, I saw no default
in a debconf window but with the latter I saw french and
ngerman as defaults as far as I tested.
So I think the following would be a correct patch:
(note
DEFAULT_ANS=`echo -n "$DEFAULTS_MERGED" | tr -d ',' | tr ' ' '\n' | sort -u | tr '\n' ',' | sed 's/,$//' | sed 's/,/, /g'`
especially the last sed 's/,/, /g')
--- tetex-bin-2.0.2/debian/config.orig Tue Sep 16 11:33:22 2003
+++ tetex-bin-2.0.2/debian/config Tue Sep 16 11:15:59 2003
@@ -1,5 +1,7 @@
#!/bin/sh -e
+DEFAULTS="french[=patois], ngerman[=naustrian-neue_Rechtschreibung]"
+
# Use debconf.
. /usr/share/debconf/confmodule || exit
db_version 2.0
@@ -52,6 +54,44 @@
db_go
db_get tetex-bin/use_debconf || true
if [ "$RET" = "true" ]; then
-db_input medium tetex-bin/hyphen || true
-db_go
+ db_fget tetex-bin/hyphen seen
+ # has this question been seen? If yes, we want to make the
+ # values chosen part of the default
+ if [ "$RET" = "true" ]; then
+ db_get tetex-bin/hyphen
+ # there might still have been no extra pattern selected
+ if [ -z "$RET" ]; then
+ DEFAULT_ANS="$DEFAULTS"
+ else
+ # If we add a default in the future, or somebody has added
+ # patterns in the buggy versions, there might be double
+ # occurences. we have to fish them out.
+ DEFAULTS_MERGED="$DEFAULTS, $RET"
+ DEFAULT_ANS=`echo -n "$DEFAULTS_MERGED" | tr -d ',' | tr ' ' '\n' | sort -u | tr '\n' ',' | sed 's/,$//' | sed 's/,/, /g'`
+ fi
+ else
+ # the question has never been seen (either fresh install
+ # or upgrading directly from woody), so there's nothing to keep:
+ DEFAULT_ANS="$DEFAULTS"
+ fi
+ db_set tetex-bin/hyphen "$DEFAULT_ANS"
+ # Every user has to see this question once again, even if he/she has
+ # yet answered the question in a previous upgrade. But this script
+ # is run again on every subsequent upgrade, and by postinst, we have
+ # to check for that.
+ db_fget tetex-bin/hyphen shown_again
+ if [ "$RET" = "false" ]; then
+ db_fset tetex-bin/hyphen seen false
+ db_fset tetex-bin/hyphen shown_again true
+ fi
+ db_input medium tetex-bin/hyphen || true
+ db_go
+ # after fiddling with the seen flag, it has to be set to true manually.
+ # We do this only if the debconf command succeeded.
+ RETVAL=$?
+ if [ "$RETVAL" -eq 0 ]; then
+ if [ "$RET" = "true" ]; then
+ db_fset tetex-bin/hyphen seen true
+ fi
+ fi
fi
Regards, 2003-11-4(Tue)
--
Debian Developer & Debian JP Developer - much more I18N of Debian
Atsuhito Kohda <kohda@debian.org>
Department of Math., Univ. of Tokushima
Reply to: