GNOME Bugzilla – Bug 62054
GnomeVFS support needed
Last modified: 2009-08-15 18:40:50 UTC
After the introduction of GnomeVFS, the MIME database has changed somewhat so that the old gnome-mime calls used by Balsa won't always return all available handlers for a MIME type. Notably, recent versions of the GNOME Control Center's MIME applet will add info in such a way that Balsa won't see it (well, actually, it will get the relevant keys, it just won't understand their meaning). It is therefore clear that Balsa needs GnomeVFS support, at least for MIME handlers. A patch that would introduce the necessary calls was submitted to the Balsa mailing list a while back. An updated version will be attached here.
Created attachment 5802 [details] [review] Introduce gnome-vfs calls for MIME handlers
I just attached the patch. Note that the "configure" test is somewhat incomplete. In particular, no attempt has been made to allow build without gnome-vfs. I'm not sure there's any point in trying that, though, as a gnome-vfs requirement may lie implicitly in the other dependencies. Also, the MIME routines will still look for old-style action keys as well. I think that ought not to be necessary, but until Bug 59670 is fixed or all software packages support GnomeVFS, it is.
The patch looks very promising but configure.in fails to detect missing vfs library. I can try to have a look at it but because this patch introduces gnome-1.4 dependency, I would rather wait with it for 1.3 series (many files need to be updated) - which hopefully should not take long.
0. an answer: I don't see a problem in introducing a dependency on gnome-vfs (it is not required so far). The compilation can even fail when gnome-vfs is not available - as long as it fails nicely (i.e at configure stage, with nice error message). I have also a question out of plain curiosity: what exactly advantage has gnome-vfs over gnome-mime for balsa?
The main advantage of introducing gnome-vfs calls is that it allows the user to set up MIME handlers for Balsa via a recent version of he GNOME Control Center. The "file types" control center applet in GNOME 1.4 updates GnomeVFS specific keys, so gnome-vfs calls won't detect the changes.
Created attachment 5971 [details] [review] Improved configure chunk. added balsa.spec.in chunk
The patch is promising. I improved the configure.in chunk and added balsa.spec.in chunk. After internal discussion, I decided not to commit this patch now but wait for 1.3.x series to open (in order not to add extra dependencies in middle of 1.2.x).
These patches has been commited and the balsa-1.3.x tree is oficially open.
I get following reports on the console: GnomeVFS-CRITICAL **: file gnome-vfs-mime-info.c: line 1063 (get_value_real): assertion `!does_string_contain_caps (mime_type)' failed.
I used to get that message, too, but it's gone now. I think the problem was that one of my custom .mime files in /usr/share/mime-info contained type names with capital letters. Apparently, they are supposed to be all lowercase.
1. I have added g_strdown() to libbalsa_body_get_content_type() to make sure mime type is always lowercase. 2. The linking order seems to be finally correct in both scenarios: with and without oafd forking (when it was wrong, balsa hang in different places on different boxes).
balsa-1.3.5 and 2.0.0 released, closing this report for good. Thanks!