From: Vincent Bernat Date: Thu, 8 May 2008 07:50:24 +0000 (+0200) Subject: Imported Debian patch 0.1.1-3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8d5c940f425507dcaa30130a7bc8c9387421ea89;p=roundcube.git Imported Debian patch 0.1.1-3 --- diff --git a/debian/changelog b/debian/changelog index 34e5dac..c2f5c14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +roundcube (0.1.1-3) unstable; urgency=low + + * Fix an error introduced when fixing bug #476803. Thanks to Micah + Anderson for spotting it (Closes: #479775). + * Avoid to pop language question at every upgrade. Thanks to Ivan Vucica + for spotting this. The problem lied in the use of db_metaget to get + the value of a key set by db_subst in a previous invocation. It seems + this is not possible any more (Closes: #480043). The fix implies that + we won't ask the question again if more languages are available since + last upgrade. + + -- Vincent Bernat Thu, 08 May 2008 09:50:24 +0200 + roundcube (0.1.1-2) unstable; urgency=low * Comment by default Alias directive for tinymce in Apache configuration diff --git a/debian/control b/debian/control index f2843b8..41c9888 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: roundcube Section: web Priority: extra Maintainer: Debian Roundcube Maintainers -Uploaders: Vincent Bernat , Romain Beauxis +Uploaders: Vincent Bernat , Romain Beauxis Build-Depends: debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), po-debconf Homepage: http://www.roundcube.net/ Standards-Version: 3.7.3 diff --git a/debian/roundcube-core.config b/debian/roundcube-core.config index c85dc70..4914ae7 100644 --- a/debian/roundcube-core.config +++ b/debian/roundcube-core.config @@ -10,30 +10,31 @@ db_go || true # Retrieve all available languages instd_langs=$(echo /usr/share/roundcube/program/localization/*/messages.inc | \ sed 's+[^ ]*/\([^ ]*\)/messages.inc+\1,+g' | sed 's+,$++') -# Retrieve the old list -db_metaget roundcube/language languages && oldchoices="$RET" -if [ ! "$oldchoices" ] || [ "$instd_langs" != "$oldchoices" ]; then - db_subst roundcube/language languages $instd_langs - db_fset roundcube/language seen false - # Firs try to get the current choice in case of preseeding - db_get roundcube/language || true - locale="$RET" - if [ -n $locale -a -d /usr/share/roundcube/program/localization/$locale ]; then - db_set roundcube/language $locale - else - # Try to guess the locale - locale=$(echo $LANG | sed 's/[@\.].*//') - if [ -d /usr/share/roundcube/program/localization/$locale ]; then - db_set roundcube/language $locale - else - locale=$(echo $locale | sed 's/_.*//') - if [ -d /usr/share/roundcube/program/localization/$locale ]; then - db_set roundcube/language $locale - else - db_set roundcube/language en_US - fi - fi - fi +db_subst roundcube/language languages $instd_langs +# First try to get the current choice in case of preseeding or if the +# question has already been asked +db_get roundcube/language || true +locale="$RET" +if [ -n "$locale" -a -d "/usr/share/roundcube/program/localization/$locale" ]; then + # We get our answer (db_set should be useless in fact) + db_set roundcube/language $locale +else + # Either we never answered the question or the locale does not + # exist any more. In both cases, we do as if we never seen the + # question. + db_fset roundcube/language seen false + # Try to guess the locale + locale=$(echo $LANG | sed 's/[@\.].*//') + if [ -d /usr/share/roundcube/program/localization/$locale ]; then + db_set roundcube/language $locale + else + locale=$(echo $locale | sed 's/_.*//') + if [ -d /usr/share/roundcube/program/localization/$locale ]; then + db_set roundcube/language $locale + else + db_set roundcube/language en_US + fi + fi fi # Ask the question db_input medium roundcube/language || true