Daily blurbs Oct. 2005


daily blurbs

30 Oct 2005 (Sun)

22:42:58 # Life Adding documentation to wysihtml. I've decided to use hevea to add info documentation to wysihtml, since I enjoy using whizzytex for editing documentation. However, I cannot find the proper option to use for hevea info output. I am looking for the option to create the INFO-DIR-SECTION and START-INFO-DIR-ENTRY sections into info files. Looking at the changelog, it seems like rawtext environment was intended to be the one, but it seems like rawtext environment outputs text indented. Two problems I found: 1. rawtext doesn't output raw text for info (and it also outputs text for text, which I don't want, not just for info). 2. hevea.sty does not have rawtext environment, and latex will no longer be able to process that documentation if I have rawtext used. I probably need to work around 2 with some conditional tex magic by detecting if the documentation is being built with hevea or tex. Oh well... That was all for my today's hack session in Shinkansen.

28 Oct 2005 (Fri)

13:35:32 # Life At Japan Debian Mini-conf. Lo-lan-do is next to me. I've started hacking on cowdancer just to realize it doesn't work at all on ibook. Hacking commences.

After two talks, I've fixed the bug on ppc, and I've come around to doing the feature fix. cowdancer now supports chmod/chown as well; and it's one step closer to being production-ready. methinks it's going to be a killer app ... someday.

14:36:39 # Life At Japan Debian Mini Conference. First talk was a talk by Martin Michlmyr on Debian Time-based Release proposal. There were three questions given.

13 Oct 2005 (Thu)

00:07:09 # Life Fixing locale date output. I was a bit annoyed with cogito giving out date in a weird format. As I expected, date format string was hardcoded; and did not respect the locale. I submit a fix for that. I hope it gets in. Hmmm... looking at it closer, it sets LANG=C, but LANG is overridden with LC_ALL. This sounds like something is not working as intended.

diff --git a/cg-Xlib b/cg-Xlib
index 0ed275f..d6d0cc1 100755
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -210,7 +210,9 @@ showdate()
        # bash doesn't like leading zeros
        [ "${tzhours:1:1}" = 0 ] && tzhours=${2:0:1}${2:2:1}
        secs=$(($secs + $tzhours * 3600 + $tzmins * 60))
-       [ "$format" ] || format="+%a, %d %b %Y %H:%M:%S $2"
+       [ "$format" ] || \
+               format="+$(locale date_fmt)" || \
+               format="+%a, %d %b %Y %H:%M:%S $2"
        if [ "$has_gnudate" ]; then
                LANG=C $has_gnudate -ud "1970-01-01 UTC + $secs sec" "$format"

18:17:32 # Life For those people discussing about dpatch and its nastiness. I'd like to throw you what's been proposed as policy 250202. What we needed is a policy here; and it's been sitting there for ... more than a year. I consider this kind of documentation issue to be what we should concentrate upon as policy.

9 Oct 2005 (Sun)

03:09:34 # Life Found a problem with bash. I've suffered problem with bash hanging on powerpc sometimes. I tracked the problem down to this patch from linuxfromscratch.org. Basically, errno was being checked without first getting a error status from system call, so if errno was accidentally EINVAL, bash entered an infinite loop. I'm not quite sure if that's a very likely situation, or feasible, but seems to explain 318301. It took a long time to reproduce and analyze, since it didn't happen all the time. The diff against the current bash is:

diff -ru bash-3.0-orig/debian/patches/wcontinued.dpatch bash-3.0/debian/patches/wcontinued.dpatch
--- bash-3.0-orig/debian/patches/wcontinued.dpatch      2005-10-09 03:06:44.000000000 +0900
+++ bash-3.0/debian/patches/wcontinued.dpatch   2005-10-09 03:07:12.000000000 +0900
@@ -51,7 +51,7 @@
 +        if (wcontinued_not_supported)
 +        waitpid_flags &= ~WCONTINUED;
        pid = WAITPID (-1, &status, waitpid_flags);
-+      if (errno == EINVAL)
++      if (pid == -1 && errno == EINVAL)
 +        {
 +          wcontinued_not_supported = 1;
 +          goto retry;

8 Oct 2005 (Sat)

20:58:28 # Life Using i386 chroot on amd64 with pbuilder. I've been told by Mythrandir that pbuilder create --distribution sid --debootstrapopts "--arch=i386" --basetgz /var/cache/pbuilder/base-i386.tgz --mirror http://ftp.jp.debian.org/debian actually works and creates a usable chroot image. I didn't think it was this simple. One caveat; there is nothing calling linux32, so building packages inside this chroot using pbuilder may cause problems depending on output of uname etc, since the architecture string will seem like x86_64 and not ix86.

4 Oct 2005 (Tue)

09:20:37 # Life Only when I really need to use gdb I kind of hate Debian. Debian doesn't ship binaries with debugging symbols by default. That's one decision that was done very long ago, and we've been working with rebuilding packages with DEB_BUILD_OPTIONS=debug,nostrip,noopt. If I'm having a lucky day, shared libraries may have a -dbg package, which may just install, but usually these means that the core file I've obtained is not useful anymore and I need to reproduce the problem with the new setup. Since we've got objcopy, it should really be feasible to ship default debug binaries in /usr/bin/debug/ and /usr/lib/debug or whatever location, and make it configurable that users not install them. IMO, users will really need debug symbols whenever they are filing useful bugs. We currently have only strace/ltrace which traces the route to the crashing point, but not what happened after the crash, which could be obtained by having a backtrace with gdb. Also, oprofile will need debug symbols to output reasonable system profiling; which seems like a good feature to have. Yeah, it's a rant.

3 Oct 2005 (Mon)

09:35:29 # Life amd64 weirdness. Since it's 64-bit, there is inevitably some problems. I've found that -etf flag of ecasound will make ecasound segfault. I don't think it ever did that on x86, so it's probably a 64-bit thing. One weirdness is that when I try to run it through gdb, it terminates normally instead of doing a segv.

1 Oct 2005 (Sat)

12:14:54 # Life A new month came. I'd start my transition to amd64 as my main machine, so I'd expect a few days of not being able to do stuff...

13:32:06 # Life I've moved pbuilder maintainers: field to the mailing list address at alioth, and moved myself to uploaders: field.

14:39:22 # Life Method to check what output charset the current locale is in. Some applications tend to parse the locale environment variables directly; but glibc does the work for you. The locale strings tend to have variations, but canonicalizations are done in glibc, and it tends to do a better job than other things. So let it do the work.

$ LC_ALL=ja_JP.EUC-JP locale  LC_CTYPE -k |grep charmap
$ LC_ALL=ja_JP.eucJP locale  LC_CTYPE -k |grep charmap
$ LC_ALL=ja_JP.utf-8 locale  LC_CTYPE -k |grep charmap

An example of using nl_langinfo in your code:

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <langinfo.h>

	setlocale(LC_ALL, "");
	printf("%s\n", nl_langinfo(CODESET));


Junichi Uekawa

$Id: 200510.html.en,v 1.13 2005/10/30 15:09:05 dancer Exp $