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

Alpha: patch for srm-reader



I've noticed that srm-reader doesn't actually work for setting the
default language from the SRM environment on alphas, because it's
looking for a two-digit hex number in
/proc/srm_environment/named_variables/language, when in all the kernels
I have here it's exposed as a single binary byte.  Fortunately, all of
the languages srm-reader knows about have values that fall in the
printable ASCII range.

The attached patch fixes this up so that the correct default language is
chosen.  If no one objects (Alastair?), I'll commit this tonight and
upload a fixed package to unstable.

-- 
Steve Langasek
postmodern programmer
Index: lang-codes
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/alpha/srm-reader/lang-codes,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 lang-codes
--- lang-codes	7 Mar 2003 12:01:25 -0000	1.1.1.1
+++ lang-codes	8 Jan 2004 22:19:13 -0000
@@ -1,16 +1,15 @@
-30:da
-32:de
-34:de_CH
-36:en_US
-38:en_GB
-3A:es
-3C:fr
-3E:fr_CA
-40:fr_CH
-42:it
-44:nl
-46:nn
-48:pt
-4A:fi
-4C:sv
-
+0:da
+2:de
+4:de_CH
+6:en_US
+8:en_GB
+::es
+<:fr
+>:fr_CA
+@:fr_CH
+B:it
+D:nl
+F:nn
+H:pt
+J:fi
+L:sv
Index: srm-reader
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/alpha/srm-reader/srm-reader,v
retrieving revision 1.2
diff -u -r1.2 srm-reader
--- srm-reader	13 Mar 2003 23:02:02 -0000	1.2
+++ srm-reader	8 Jan 2004 22:19:13 -0000
@@ -10,7 +10,7 @@
 
 LANGCODE=`cat /proc/srm_environment/named_variables/language`
 
-LANG=`grep $LANGCODE /usr/share/srm-reader/lang-codes | cut -d: -f2`
+LANG=`grep "^$LANGCODE:" /usr/share/srm-reader/lang-codes | cut -b3-`
 if [ "x$LANG" != "x" ] ; 
 	db_set debian-installer/language $LANG
 fi

Attachment: pgpRjuLGtBX15.pgp
Description: PGP signature


Reply to: