Re: bug in dpkg (was Re: packages in the old format)
On Fri, 22 Aug 1997, Enrique Zanardi wrote:
> .../stable/binary-i386/x11$ dpkg-deb -f xkeycaps_2.29-3.deb
> dpkg-deb: `xkeycaps_2.29-3.deb' is not a debian format archive
>
> .../stable/binary-i386/x11$ env | grep LC_ALL
> LC_ALL=es_ES
>
> .../stable/binary-i386/x11$ export LC_ALL=C
>
> .../stable/binary-i386/x11$ dpkg-deb -f xkeycaps_2.29-3.deb
> PACKAGE: xkeycaps
> VERSION: 2.29-3
[...]
> Yeah, that was it. dpkg 1.4.0.19 has a bug related with internationalization.
> I will check the sources and send the bug-report.
I've identified the bug. It's just that sscanf uses the current locale
definition of "decimal_point" to extract a float from the string "0.9300".
For some locales the decimal point is just that, a point, but for
others (for example for german, french, or spanish) it is a comma,
so the sscanf will extract "0" instead of "0.93"
The suggested patch is:
*** dpkg-1.4.0.19/dpkg-deb/main.c.orig Fri Aug 22 18:11:40 1997
--- dpkg-1.4.0.19/dpkg-deb/main.c Fri Aug 22 18:12:03 1997
***************
*** 137,142 ****
--- 137,143 ----
jmp_buf ejbuf;
setlocale(LC_ALL, "");
+ setlocale(LC_NUMERIC, "POSIX");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
Thanks,
--
Enrique Zanardi ezanardi@noah.dfis.ull.es
Dpto. Fisica Fundamental y Experimental
Univ. de La Laguna
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: