[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#204958: "Leave it alone" option in fresh install breaks future upgrades of locales



Mike, please always reply to 204958@bugs.d.o., your replies are
not stored into the BTS if you mail me privately.

On Thu, Aug 14, 2003 at 09:39:03AM -0500, Mike Vincent wrote:
[...]
> > > Yes, I knew that's why it was failing and fixed it. Your assumption that
> > > /etc/locale.gen contained "Leave alone" was correct, but I did not
> > > edit the file myself. This was a new install and during the installation
> > > process when it asked me which locale I wanted to setup the first option
> > > was "Leave alone" and I just chose that and I guess it wrote that to the
> > > file. ;( 
> > 
> > Fine, we know have to find the culprit.  How did you install your system?
> > From a woody CD, debian-installer (if so, please tell when it was generated),
> > something else?
> 
> I used the bf2.4 woody net-inst iso located at I believe, 
> http://people.debian.org/~dwhedon/boot-floppies/

In fact this error belongs to the locales package, and it is mine :(
Glibc-maintainers, this means that if "Leave alone" was selected
in locales < 2.3.2, new configuration will always break, so this is
quite annoying.  The attached patch fixes this bug, could someone
please review and apply it?  Thanks.
And also thanks to Mike for having submitted this bugreport.

Denis
Index: debian/changelog
===================================================================
RCS file: /cvs/glibc/glibc-package/debian/changelog,v
retrieving revision 1.262
diff -u -r1.262 changelog
--- debian/changelog	10 Aug 2003 00:01:51 -0000	1.262
+++ debian/changelog	14 Aug 2003 22:38:10 -0000
@@ -5,6 +5,9 @@
     - debian/patches/80_glibc232-futimes-buildfix.dpatch: Fix build failure
       on arm, mips, mipsel, due to be missing #include <string.h>.
       (Closes: #204768)
+    - debian/locales/DEBIAN/config: The "Leave alone" option has been
+      removed, but locale-gen crashes if it was set by a previous run,
+      so really discard it.  (Closes: #204958)
 
  -- GOTO Masanori <gotom@debian.or.jp>  Fri,  8 Aug 2003 20:32:24 +0900
 
Index: debian/locales/DEBIAN/config
===================================================================
RCS file: /cvs/glibc/glibc-package/debian/locales/DEBIAN/config,v
retrieving revision 1.6
diff -u -r1.6 config
--- debian/locales/DEBIAN/config	28 Apr 2003 04:45:02 -0000	1.6
+++ debian/locales/DEBIAN/config	14 Aug 2003 22:38:10 -0000
@@ -9,6 +9,12 @@
 #   configuration files
 if [ -e /etc/locale.gen ]; then
     LG=/etc/locale.gen
+    #  Debconf templates in locales < 2.3.2 were completely different,
+    #  the locales/locales_to_be_generated question could have a "Leave alone"
+    #  value in which case locale-gen was not run.
+    #  With current implementation, this string has to be removed.
+    grep -q "Leave alone" $LG && sed -e '/^Leave alone/d' $LG > $LG.tmp && mv $LG.tmp $LG
+
     SELECTED_LOCALES=$(sed -e '/^[a-zA-Z]/!d' $LG | tr '\n' ',' | sed -e 's/,/, /g' -e 's/, *$//')
     db_set locales/locales_to_be_generated "${SELECTED_LOCALES}"
 else

Reply to: