[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

And you thought tar was stable

Filed under: General — Thomas @ 22:22

2006-09-27
22:22

Apparently, tar has changed some default behaviour:

Previous versions of GNU tar assumed shell-style globbing when extracting from or listing an archive. For example:

          $ tar xf foo.tar '*.c'
     

would extract all files whose names end in ‘.c’. This behavior was not documented and was incompatible with traditional tar implementations. Therefore, starting from version 1.15.91, GNU tar no longer uses globbing by default. For example, the above invocation is now interpreted as a request to extract from the archive the file named *.c.

Looks fairly innocent, except that it completely breaks rpmbuild -ta.

I'm sure the tar people would blame rpm for doing something stupid in the way they use tar. On the other hand, deprecating behaviour in a stable series is probably not a good thing to do, and if it affects a widely used piece of software like rpm, clearly there is a process failure somewhere, either at the distro, or in both of these projects. Problems like this happen all the time, and I'm definitely not going to say I haven't made any of these mistakes in any of the projects I've worked on.

But I guess I should remember this particular instance next time someone accuses GStreamer of not being API/ABI/feature stable, when in reality we spend an inordinate amound of time and effort in making sure it is, to the best of our knowledge.

For those of you who have problems with rpmbuild -ta, setting TAR_OPTIONS to --wildcards should help. And that particular workaround should allow me to fix my buildslaves again.

keyboard settings dialog

Filed under: General — Thomas @ 22:22

22:22

I just logged into my desktop at home and it asked me the following question on login:

The X system keyboard settings differ from your current GNOME keyboard settings.

Expected was model "pc105", layout "us_intl" and no options, but the the following settings were found: model "pc105", layout "us	intl" and no options.

Which set would you like to use?

The choices were "Use X settings" and "Keep GNOME settings".

That dialog has three problems right off the bat. First of all, "the the" is a band so obscure nobody reading the dialog would catch the reference. Second, I can't tell the difference between what it expected and what it found. Third, suppose there was a difference - let's say for argument's sake that it expected "us" and not "us_intl". Which of those two would be the X settings and which would be the GNOME settings ?

At least it realizes that I might end up preferring to never see this warning again.

update: after a good night of rest, I look at the dialog again and I see there actually is a difference. One of them says us_intl, and the other says us intl, without the underscore. Who could tell ? I feel like such a dolt for blaming this dialog box now when it was me being stupid all along.

Mail Trouble

Filed under: General — Thomas @ 20:32

2006-09-24
20:32

Mail has not been good to me this year. Like everyone else I'm getting increasing amounts of spam. But there are other problems I'm having that aren't helping me either. For one thing, my work account (which I used POP to access, but I leave mails on the server because I want to be able to read my mail from any computer) has repeatedly given me every mail I ever received (including spam) as new mail a bunch of times now. Today it did three times in a row, leaving me with over 9000 unread mails in my inbox.

I don't know if it's Evolution or the mail server, but in any case, apparently that account also supports IMAP so I'm switching to that. After I did, I had 29000 mails in my INBOX - since really, the folders I made on my local computer were not on the server. So apparently on the server I had this many mails. Jikes.

Also over the last year, Evolution's spamassassin has been mostly useless, letting through 90% of spam mails. Today I wanted to dig a little deeper on why this was happening.

So I figured out that you can save a mail to disk, then use spamassassin -t on the mail to get a nice report. Sure enough, all these obvious spam mails got high scores. I don't know however how Evolution invokes spamassasin - does anybody know ?.

I found some sites that mentioned you can create your own rule to pipe through spamassassin using -e to get a return code. Except on my FC5 machine, -e obviously does not work. After some digging through the unreadable mass of Perl code, I found this line:

eval { $exitvalue ||= !$iter->run(@targets); };

(God how I hate Perl with a passion these days).
Removing the exitvalue part from that line suddenly made it return proper values again. It didn't actually fix Evolution, so I assume it does not use spamassassin -e, but at least it allows me to use the expensive custom rule (expensive since it forks for every mail, which will take some time on this 29000 mail INBOX).

Curiously, FC5 ships a 3.1.3 version, and the 3.0.3 version of FC4 does not have the strange construct above.

So now I'm going to slowly filter all my mailboxes, move my POP folders to my IMAP server after cleaning, and after that try and go through my INBOX to clean out and reply to people. (I came to work especially for this today because of course my home ADSL resets every fifteen minutes, but that's a different story.)

Anyway, if anyone wants to share some experiences about SpamAssassin and FC5, let me know.

On a side note, I seriously don't understand Evolution sometimes. To oversimplify, let's pretend that there are only two mail protocols, POP and IMAP, the difference between which mere mortals should not have to understand, and let's pretend that mere mortals really only send and receive mail, and to this end basically have the folders INBOX, Drafts, Sent, and Trash.

I would expect these four folders to be pretty much treated the same, and not be different depending on the protocol. I'm sure there are valid technical reasons why this is hard, but on a high-level, this is what you would want, right ?

Turns out that as far as I can tell, all POP mails arrive *in the same folder*, no matter what, which is "Inbox" under "On This Computer". But you can customize drafts and sent - even though no really I would like to customize Inbox, because that's the only one *worth* customizing. However, with IMAP, you get a nice separate section on the same level as "On This Computer". Sigh.

UPDATE:

  • After filtering a selection of 1000 mails with my new rule that forks through spamassassin, Evolution just gave up with a "too many open files error". Few programs deal with this correctly, but of course few programs manage to run out of them in the first place :)
  • after digging around in the latest source tarball (3.1.5), it seems this bug is what I'm seeing above. I'll rebuild and hopefully this will help Evolution as well.

    For the love of Pychecker

    Filed under: General — Thomas @ 18:03

    2006-09-22
    18:03

    Spent way too much time today poking at problems pychecker was reporting on Flumotion. The problem with most code checkers is that they often report problems in code you don't care about because it's beyond your control, and that once in a while you want to do explicitly allow a specific instance of a bad thing Just This Once. The usefulness of the tool is directly related to the granularity with which you can enable or disable checks for specific objects, from small functions to complete modules.

    After fixing a few easier problems, I again got the eerie sensation that pychecker was not reporting all the problems it should. I would run pychecker on less files than a standard make check does, and get more warnings. Paradoxically quixotic. The problem is it's kind of slow to reproduce, on my laptop, taking a few minutes to run pychecker, so playing with the file arguments to see where it went wrong was a little time-consuming. When chasing bugs, it always pays off to spend some time poking at the Black Box and taking your Diamond Saw of Perception and shave off chunks of the box. Try to find the simplest test case that reproduces the problem.

    At some point I noticed that it was not necessarily the contents of the file that caused warnings to go away - I renamed a file to something else and suddenly it did show all the warnings when checking that newly named file. That finally gave me the last clue I needed to find the most minimal test case.

    Since seeing is believing, I've written a third-millenium play that explains the bug. All you need to do is:

    svn co https://thomas.apestaart.org/thomas/svn/tests/pychecker/order; cd order; make

    For the lazy ones, I've had Zaheer make me a screencast:

    release-a-roo

    Filed under: General — Thomas @ 21:18

    2006-09-14
    21:18

    [moap-trunk] [thomas@otto trunk]$ moap doap -f /home/thomas/svn/tests/redland/doap/gst-plugins-base.doap -v 0.10.10 mail -f thomas@apestaart.org gstreamer-devel@lists.sourceforge.net gstreamer-announce@lists.sourceforge.net kde-multimedia@kde.org gnome-multimedia@gnome.org
    Downloading http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.10.tar.bz2 ... done.
    Downloaded gst-plugins-base-0.10.10.tar.bz2 in current dir
    Sending release announcement ... sent.
    [moap-trunk] [thomas@otto trunk]$ moap doap -f /home/thomas/svn/tests/redland/doap/gst-plugins-base.doap -v 0.10.10 freshmeat - Submitting release of GStreamer Base Plug-ins 0.10.10
    

    Releasing used to be a long drawnout process riddled with intricate little complicated steps involving lots of manual labour.

    It's still a long drawnout process. But it's fun to write tools that take away the repetitiveness, allowing me more time to focus on the release parts that really need manual attention. Like, eating pizza.

    In related news, today saw a release of GStreamer Core and Base Plugins, as well as Cortado.

    Next Page »
    picture