Subject: Re: CVS commit: pkgsrc/shells/bash2
To: Jonathan Perkin <jonathan@perkin.org.uk>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 08/03/2004 10:36:54
--Signature=_Tue__3_Aug_2004_10_36_54_-0500_YnYTtNUbRK4BfSq6
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
* Jonathan Perkin, Tue, 3 Aug 2004 16:37:14 +0100:
> [ Sorry for the late reply, taken me a while to diagnose this.. ]
>
> * On 2004-06-22 at 14:05 BST, Min Sik Kim wrote:
>
> > Modified Files:
> > pkgsrc/shells/bash2: Makefile distinfo
> > pkgsrc/shells/bash2/patches: patch-aa patch-ac patch-ad
> > Added Files:
> > pkgsrc/shells/bash2/patches: patch-ah patch-ai patch-aj
> >
> > Log Message:
> > Disable multibyte support only when wctype_t is not available. The
> > previous patches disabled it on NetBSD unconditionally. Bump
> > PKGREVISION.
>
> This subtly breaks things in an odd way, probably best explained by the
> following:
>
> $ bash --noprofile --norc
> bash-2.05b$ echo $PS1
> \s-\v\$
> bash-2.05b$ PS1="\[\033]2;title bar\007\]\s-\v$ " # set up title bar
> bash-2.05b$ echo $LC_CTYPE # notice the extra space in the prompt.
> en_GB.ISO8859-15
> bash-2.05b$ LC_CTYPE=en_US.UTF-8 # watch the space disappear
> bash-2.05b$ LC_CTYPE=C # and come back again...
> bash-2.05b$ PS1="\033]2;title bar\007\s-\v$ " # don't compute width properly
> bash-2.05b$ this is some long text which will start wrapping here
>
> and if I carry on typing it overwrites the "bash-..." at the beginning
> of the line (although this behaviour is the same as with standard bash).
>
> Backing out these changes reverts to standard working behaviour. Now,
> this is hardly a critical bug, but it's actually rather annoying! If
> nobody knows the quick fix to this (I've not a clue where to start
> looking), could it be backed out, or are the fixes worth the
> inconvenience to anyone using escape sequences in their prompt?
I prefer having multibyte support because otherwise it's impossible to
use multibyte languages (Korean, for example) at all, but I'm
definitely biased.
How about adding a knob to turn off the multibyte support until we
find the right fix? See the patch below.
Regards,
Min
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/shells/bash2/Makefile,v
retrieving revision 1.54
diff -u -r1.54 Makefile
--- Makefile 11 Jul 2004 01:23:29 -0000 1.54
+++ Makefile 3 Aug 2004 15:28:57 -0000
@@ -30,12 +30,16 @@
.include "../../mk/bsd.prefs.mk"
-BUILD_DEFS+= BASH_STATIC
+BUILD_DEFS+= BASH_STATIC BASH_USE_MULTIBYTE
.if defined(BASH_STATIC) && !empty(BASH_STATIC:M[yY][eE][sS])
CONFIGURE_ARGS+= --enable-static-link
.endif
+.if defined(BASH_USE_MULTIBYTE) && !empty(BASH_USE_MULTIBYTE:M[nN][oO])
+CONFIGURE_ENV+= ac_cv_type_wctype_t=no
+.endif
+
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/bash.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/bashbug.1 ${PREFIX}/man/man1
--Signature=_Tue__3_Aug_2004_10_36_54_-0500_YnYTtNUbRK4BfSq6
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iQEVAwUBQQ+xFvQsKR/Zi7L+AQIK5Af/aZY9rX7808lGL9N5cyNhbdVUre9rM2QW
FpNf423Z5v4ZFpVMgWTDE++17mJIob3gte5oQIRyiIaxVYh+dSm3wcSq60/A6mQZ
DNJzSo8cAgMnKBP796aWT4OqwdZoi+3uG+NXYaMD83NLZ3hSU6S9ZN/GvAimgDYq
/8ZVbiurg3JTOmesPzuFwd7p9UCY9qXNART46ry9mMLv7MvB1hPQdzRl0/8vyrem
YnQP8/0oqkCrtkqo+rQnNCt0Trwp8ssRyh/O/BxVqh+oXSb2SZYY9wwSv5X9+L50
CKFmdY6/hVB3mDW3+MgTzDddjaonyuM79rFB3SjSjK6zbRN1tjM2lA==
=LIZZ
-----END PGP SIGNATURE-----
--Signature=_Tue__3_Aug_2004_10_36_54_-0500_YnYTtNUbRK4BfSq6--