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

Bug#276752: marked as done (Switching console to unicode mode produces some side effects)



Your message dated Mon, 18 Oct 2004 18:02:06 -0400
with message-id <E1CJfZu-0007LR-00@newraff.debian.org>
and subject line Bug#276752: fixed in kbd-chooser 1.05
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 Oct 2004 03:43:52 +0000
>From roktas@samsun.omu.edu.tr Fri Oct 15 20:43:51 2004
Return-path: <roktas@samsun.omu.edu.tr>
Received: from samsun.omu.edu.tr [193.140.28.3] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CIfTw-0001NC-00; Fri, 15 Oct 2004 20:43:49 -0700
Received: from localhost (localhost [[UNIX: localhost]])
	by samsun.omu.edu.tr (8.11.6/8.11.6) id i9G3cWL28185;
	Sat, 16 Oct 2004 06:38:32 +0300
Date: Sat, 16 Oct 2004 06:38:31 +0300
From: Recai Oktas <roktas@omu.edu.tr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Switching console to unicode mode produces some side effects
Message-ID: <20041016033831.GA27578@oxygen>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="JYK4vJDZwFMowpUq"
Content-Disposition: inline
X-Reportbug-Version: 2.63
User-Agent: Mutt/1.5.6+20040907i
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--JYK4vJDZwFMowpUq
Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
Content-Disposition: inline


--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=iso-8859-9
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Package: kbd-chooser
Severity: important
Tags: patch l10n d-i

As explained in #276548 installing the keymap to /target when console is
in the unicode mode produces some side effects which directly effect
the Turkish keyboard.  Could you please apply the patch attached which
incorporates a workaround for #276548?

    Changelog:

    * As a workaround to #276548, temporarily switch to ascii mode
      before installing the Turkish keymap.

This patch includes a simple code change in kbd-mode which simplifies
similar workarounds.  I've tested it enough and observed that it works.
No other keymaps other than Turkish will be affected by this patch.

Regards,

--=20
roktas

--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=iso-8859-9
Content-Disposition: attachment; filename="kbd-chooser.patch"
Content-Transfer-Encoding: quoted-printable

diff -ruN kbd-chooser.orig/debian/prebaseconfig kbd-chooser/debian/prebasec=
onfig
--- kbd-chooser.orig/debian/prebaseconfig	2004-04-19 05:13:49.000000000 +03=
00
+++ kbd-chooser/debian/prebaseconfig	2004-10-15 21:35:30.000000000 +0300
@@ -10,20 +10,38 @@
 	exit 0
 fi
=20
-# Install non-Unicode variants of Turkish keymaps
-if [ "$KEYMAP" =3D "trqu" ]; then
-	KEYMAP=3D"trq"
-	db_set debian-installer/keymap $KEYMAP
-fi
-if [ "$KEYMAP" =3D "trfu" ]; then
-	KEYMAP=3D"trf"
-	db_set debian-installer/keymap $KEYMAP
-fi
+case "$KEYMAP" in
+	trqu|trfu)
+		# Install non-Unicode variants of Turkish keymaps
+		if [ "$KEYMAP" =3D "trqu" ]; then
+			KEYMAP=3D"trq"
+		elif [ "$KEYMAP" =3D "trfu" ]; then
+			KEYMAP=3D"trf"
+		fi
+
+		# Switch to ascii mode when installing these keymaps
+		forced_mode=3D"ascii"
+		db_set debian-installer/keymap $KEYMAP
+		;;
+	*)
+		# Nothing to do.
+		;;
+esac
=20
 db_get debian-installer/serial-console
 if [ "$RET" =3D "false" ] ; then
 	apt-install console-tools console-data console-common=20
+
+	if [ -n "$forced_mode" ]; then
+		saved_mode=3D`kbd-mode`
+		kbd-mode --$forced_mode
+	fi
+
 	chroot /target install-keymap $KEYMAP
+
+	if [ -n "$saved_mode" ]; then
+		kbd-mode --$saved_mode
+	fi
 fi
=20
=20
diff -ruN kbd-chooser.orig/kbd-mode.c kbd-chooser/kbd-mode.c
--- kbd-chooser.orig/kbd-mode.c	2004-07-04 20:05:15.000000000 +0300
+++ kbd-chooser/kbd-mode.c	2004-10-15 21:45:59.000000000 +0300
@@ -32,6 +32,12 @@
 #define di_info(format...) di_log(DI_LOG_LEVEL_INFO, format)
 #endif
=20
+/* Descriptive names for keyboard modes.  */
+#define S_XLATE     "ascii"
+#define S_MEDIUMRAW "keycode"
+#define S_RAW       "scancode"
+#define S_UNICODE   "unicode"
+
 extern int getfd (void);
=20
 static char *progname =3D "kbd-mode";
@@ -42,11 +48,11 @@
 	puts   ("Report and set keyboard mode");
 	puts   ("");
 	puts   ("Options are:");
-	puts   ("-h --help       print this help information and exit");
-	puts   ("-a --8bit       ASCII or 8bit mode (XLATE)");
-	puts   ("-k --keycode    keycode mode (MEDIUMRAW)");
-	puts   ("-u --unicode    UTF-8 mode (UNICODE)");
-	puts   ("-s --scancode   scancode mode (RAW)");
+	puts   ("-h --help"         "\tprint this help information and exit");
+	puts   ("-a --" S_XLATE     "\tascii or 8bit mode (XLATE)");
+	puts   ("-k --" S_MEDIUMRAW "\tkeycode mode (MEDIUMRAW)");
+	puts   ("-s --" S_RAW       "\tscancode mode (RAW)");
+	puts   ("-u --" S_UNICODE   "\tunicode mode (UNICODE)");
 }
=20
 static int parse_cmdline (int argc, char *argv[])
@@ -55,12 +61,11 @@
 	int c;
 	const struct option long_opts[] =3D {
 		{ "help"     , no_argument, NULL, 'h' },
-		{ "8bit"     , no_argument, NULL, 'a' },
-		{ "ascii"    , no_argument, NULL, 'a' },
-		{ "keycode"  , no_argument, NULL, 'k' },
-		{ "scancode" , no_argument, NULL, 's' },
-		{ "unicode"  , no_argument, NULL, 'u' },
-		{ NULL, 0, NULL, 0 }
+		{ S_XLATE    , no_argument, NULL, 'a' },
+		{ S_MEDIUMRAW, no_argument, NULL, 'k' },
+		{ S_RAW      , no_argument, NULL, 's' },
+		{ S_UNICODE  , no_argument, NULL, 'u' },
+		{ NULL       , 0,           NULL, 0   }
 	};
 =09
 	mode =3D -1;
@@ -68,19 +73,22 @@
 		switch (c) {
 			case 'h':
 				usage ();
-				exit(0);
+				exit (0);
 			case 'a':
 				mode =3D K_XLATE;
 				break;
-			case 'u':
-				mode =3D K_UNICODE;
+			case 'k':
+				mode =3D K_MEDIUMRAW;
 				break;
 			case 's':
 				mode =3D K_RAW;
 				break;
-			case 'k':
-				mode =3D K_MEDIUMRAW;
+			case 'u':
+				mode =3D K_UNICODE;
 				break;
+			default:
+				di_error ("%s: error parsing command line\n", progname);
+				exit (1);
 		}
=20
 	return mode;
@@ -89,16 +97,16 @@
 static const char *desc (int mode)
 {
 	switch (mode) {
-		case K_RAW:
-			return "raw (scancode)";
-		case K_MEDIUMRAW:
-			return "mediumraw (keycode)";
 		case K_XLATE:
-			return "ASCII (default)";
+			return S_XLATE;
+		case K_MEDIUMRAW:
+			return S_MEDIUMRAW;
+		case K_RAW:
+			return S_RAW;
 		case K_UNICODE:
-			return "Unicode (UTF-8)";
+			return S_UNICODE;
 		default:
-			return "unknown";
+			return NULL;
 	}
 }
=20
@@ -111,14 +119,23 @@
=20
 	fd =3D getfd ();
 =09
-	/* Report console mode.  */
+	/*=20
+	 * Report console mode in a way so that it can=20
+	 * be used later as a command line option.
+	 */
 	if (mode =3D=3D -1)	{
+		const char *mode_str;
+
 		if (ioctl (fd, KDGKBMODE, &mode)) {
 			di_error ("%s: error reading console mode\n", progname);
 			exit (1);
 		}
=20
-		printf ("Console mode: %s\n", desc (mode));
+		mode_str =3D desc (mode);
+		if (! mode_str)
+			di_info ("%s: unknown console mode reported\n", progname);
+		else
+			printf ("%s\n", mode_str);
=20
 		exit (0);
 	}

--T4sUOijqQbZv57TR--

--JYK4vJDZwFMowpUq
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBcJe3nA44mz/SXIQRAt/FAJ9ih2IOa9ohouWjhK0LTrHnxMCsuQCffnIg
eex3Vxb/SGm03q5auvsHUIo=
=NQkN
-----END PGP SIGNATURE-----

--JYK4vJDZwFMowpUq--

---------------------------------------
Received: (at 276752-close) by bugs.debian.org; 18 Oct 2004 22:08:25 +0000
>From katie@ftp-master.debian.org Mon Oct 18 15:08:25 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CJfg1-0003Bo-00; Mon, 18 Oct 2004 15:08:25 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1CJfZu-0007LR-00; Mon, 18 Oct 2004 18:02:06 -0400
From: Christian Perrier <bubulle@debian.org>
To: 276752-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#276752: fixed in kbd-chooser 1.05
Message-Id: <E1CJfZu-0007LR-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Mon, 18 Oct 2004 18:02:06 -0400
Delivered-To: 276752-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: kbd-chooser
Source-Version: 1.05

We believe that the bug you reported is fixed in the latest version of
kbd-chooser, which is due to be installed in the Debian FTP archive:

kbd-chooser_1.05.dsc
  to pool/main/k/kbd-chooser/kbd-chooser_1.05.dsc
kbd-chooser_1.05.tar.gz
  to pool/main/k/kbd-chooser/kbd-chooser_1.05.tar.gz
kbd-chooser_1.05_i386.udeb
  to pool/main/k/kbd-chooser/kbd-chooser_1.05_i386.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 276752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated kbd-chooser package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 18 Oct 2004 23:09:40 +0200
Source: kbd-chooser
Binary: kbd-chooser
Architecture: source i386
Version: 1.05
Distribution: unstable
Urgency: high
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description: 
 kbd-chooser - Detect a keyboard and select layout (udeb)
Closes: 276752
Changes: 
 kbd-chooser (1.05) unstable; urgency=high
 .
   * Recai Oktas
     - debian/prebaseconfig
       - Workaround for fixing side effects while loading keymaps in
         non Latin-1, non UTF-8 environments, for Turkish, Hebrew,
         Lithuanian, Latvian. Closes: #276752
   * Christian Perrier
     - debian/templates-in
       - File renamed to kbd-chooser.templates-in for better readability
         of merged PO files
Files: 
 115cbf747f0a7f5ada9419923c61c2ac 822 debian-installer optional kbd-chooser_1.05.dsc
 df02e61806faff3288b5a859330d1032 66277 debian-installer optional kbd-chooser_1.05.tar.gz
 0c09645bcd0086c9d449127f4b60d4f9 35848 debian-installer optional kbd-chooser_1.05_i386.udeb
package-type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBdDs51OXtrMAUPS0RApVcAKC7O/qADY6zfSsySNDLkmXAfoA0/QCcCbiB
5rdICiMoLYG0Wt//WadKbSc=
=/aFN
-----END PGP SIGNATURE-----



Reply to: