Re: [Evolution] Major Architectural Problem with Evolution

On Fri, 2001-10-12 at 10:40, Williams, Sam HS-SNS wrote:
I have found what appears to me to be a majot architectural flaw within
evolution. It seems that somewhere there is a config file that evo opens at
the time it gets executed. This file apparently stays open all during the
evo session. This is well and good and cool until you run out of filesystem
space...... When the evolution session ends it apparently writes whatever is
necessary to this file, closes it and the world is good, unless you have no
filesystem space. In this scenario the file doesn't get written and all data
that was be saved can not be.

End result is that when you clean up the filesystem problem and try to
restart evolution it doesn't see this prerequisite config file with any
content and makes the assumption you are a new user and need to configure a
new session. I have seen the problem with kmail before.... The more
appropriate design would be to read the config data from the file(s) at run
time, but not open the file for appending or writing. If you make changes to
the environment that need to be saved, this can occur as you shutdown. If
you have no filesystem space and the data can not be written, you lose a
little work, but your work environment remains intact.

How is this different than what you are accusing of us doing wrongly?
Above you stated this was The Wrong Way, and now you are claiming it is
The Right Way. So...which is it?

The Right Way, of course, is to save the file to a temp file and, if
successful, rename it to the real file name. If not successful, don't do

This is what Bonobo-Conf already does, it seems... or at least that's
what it looks like it does based on the source code. Maybe you are
running an old version which did not do this?

Here's the section of code I'm reading:

        tmp_name = g_strdup_printf ("%s.tmp.%d\n", xmldb->filename, getpid ());

        if (xmlSaveFile(tmp_name, xmldb->doc) < 0) {
                g_free (tmp_name);
                db->writeable = FALSE;

        /* chmod (tmp_name, 0664); */

        if (rename (tmp_name, xmldb->filename) < 0) {
                g_free (tmp_name);
                db->writeable = FALSE;

Assuming I'm not missing something, I'd say it's doing it The Right Way.


Sam Williams
sam williams hs utc com
samurai acm org

evolution maillist  -  evolution ximian com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]