a blog by Marius Gedminas

Happiness is...

... not having a headache.

In other news, my Nokia N810 Internet Tablet finally arrived. It looks better in real life than in pictures.

Strange quirk: the 2 gigs of extra internal flash memory (formatted as FAT32) are mostly unused (according to df) while at the same time being three quarters full (according to du):

/media/mmc2 $ df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/mmcblk0p1            1.9G      8.0k      1.9G   0% /media/mmc2
/media/mmc2 $ du -sh .
1.5G    .

Ouch. Time to run fsck.vfat on it. Or perhaps just reformat, to avoid the other famous bug (attempt to access beyond end of device), which, let me check, yes, I also see:

[584959.868000] usb-storage: device scan complete
[584959.868000] scsi 3:0:0:0: Direct-Access     Nokia    N810              031 PQ: 0 ANSI: 2
[584959.868000] scsi 3:0:0:1: Direct-Access     Nokia    N810              031 PQ: 0 ANSI: 2
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.872000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.872000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.872000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.876000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.876000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.876000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.876000]  sdb: sdb1
[584959.880000]  sdb: p1 exceeds device capacity
[584959.884000] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[584959.884000] sd 3:0:0:0: Attached scsi generic sg2 type 0
[584959.884000] sd 3:0:0:1: [sdc] Attached SCSI removable disk
[584959.884000] sd 3:0:0:1: Attached scsi generic sg3 type 0
[584960.240000] attempt to access beyond end of device
[584960.240000] sdb: rw=0, want=4013848, limit=3932160
[584960.240000] Buffer I/O error on device sdb1, logical block 501728

It would be interesting to know how this came to be. Do some N810s have more internal memory than others? Or was the filesystem image made too big for all of them by accident?

Nokia can has web server pls?

The inability of Nokia to provide reliable web servers for repository.maemo.org and tablets-dev.nokia.com is annoying. I am unable to build packages for N810 because the apt repository that contains build dependencies is down, and apparently has been down for a couple of days already.

Linux on a Thinkpad T23

Andrew Dalke writes about his painful attempts to install Ubuntu Feisty on a Thinkpad T23. I've had a T23 and ran various versions of Ubuntu on it happily. When it works, Ubuntu (and Linux in general) is great; when it doesn't work, it is painful (but at least I can fix it, unlike, say, Windows).

One thing, though: the T23 doesn't support USB2. Using an external hard disk over USB1 is very slow and uncomfortable. Also, I wonder what sort of an install disk Andrew used. It sounds like a server or alternate install CD -- the regular desktop CD installs X and everything else for you.

Testing unit test coverage

Lars Wirzenius writes about measuring unit test coverage with coverage.py.

I've been doing the same thing with trace.py from the Python standard library, and the Zope 3 test runner. The pretty HTML output is generated by z3c.coverage by a nightly buildbot run, and any regressions in test coverage are reported via email ("module foo.bar got 5 new untested lines of code"), also thanks to z3c.coverage.I wonder about the differences between coverage.py and trace.py sometimes, but so far I haven't found the time to investigate.

This is the point where I wish PyBlosxom had a simple-to-install, spam-proof comment plugin. Oh well, there's a mailto: link below each post.