Re: [orca-list] Changed the user's preference directory



Hi,

While some people seem to think I'm against change instead of against
bad changes, I'm fine with this.

On Mon, Jul 26, 2010 at 05:36:47AM +0200, Juanje Ojeda wrote:
Hi :-)

I've just pushed two patches[1][2] to the master in order to fix this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=596108

The bug is about to use XDG locations for storing configuration files.
XDG locations are the Freedesktop.org ones:
http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

This is important because two reasons:
 * This is a goal for GNOME to have moved all the user's configs to
XDG locations[3]
 * It's crossdesktop solution

fine by me.  Personally I think both are perfectly cross desktop.  One
question, shouldn't this be XDG_CONFIG_HOME not XDG_DATA_HOME?
Personally I don't see the point in this standard (it seems like a
standard looking for a problem to solve), but I'm fine with doing what it
suggests because it seems to make some people happy.

We know there is people here using the Orca master's version and the
one from their distro and to move their ~/.orca to XDG-DATA-HOME/orca
could be a problem because the one from the distro won't know anything
about this new location.
That's why right now the migration is optional. Let's see with some user cases:
 * New user install the version from master. He/she hasn't run Orca
before so hasn't got any configs stored at ~/.orca.
When the user run Orca the first time, it will create the
configuration files at XDG-DATA-HOME/orca
 * Betatester is using the version from his/her distro but also is
testing the last version from master. To be able to switch from one to
another version keeping the configs, the config directory must be
~/.orca. The one that understand both versions.
By default, the new code from master won't change anything, so this
case is safe.
 * User want to have the last version from the master and just that
version. The new code has a new command line option for migrating the
config files ('-m, --migrate-config').
If the user pass this option the ~/.orca directory will be moved to
XDG-DATA-HOME/orca.

The idea is to change the default behavior just before the release,
when the betatesters won't need so much to main both versions. Then
the migrate option will be deleted and the default behaviour will be
to use XDG-DATA-HOME and if ~/.orca exists, this will me moved to the
new location.

Personally I would have used the move and link approach that Joanie
commented on in the bug, but I gues this works.  My reasoning is
basically that it feels a lot cleaner to do it that way.  Doing it
something like this also results in far fewer special cases.

if [ -d $XDG_DATA_HOME/orca ]
then
mv $HOME/.orca $XDG_DATA_HOME/orca
ln -s $XDG_DATA_HOME/orca $HOME/.orca
fi

Of course this doesn't take care of notifying the user which probably
has to be done in python instead of the shell wrapper.  What this
would get us is that new versions of orca only have to worry about xdg
stuff and older versions can happily use $HOME/.orca

One idea this gives me is that a lot of applications provide a flag to
provide a path to alternate configuration is this something that
people think is a good idea?

One other thing to keep in mind is that while some distributions may
tie release cycles to gnome releases many do not, and distributions
may well also be shipping old gnome versions (debian ships 2.22 on the
current stable and RHEL ships 2.16, I'm not sure what the next RHEL
release will use, but I believe debian will ship 2.30).

I'm not sure if I've explain myself well but the lasts comments at the
bug maybe can clarify it. I think Joanmarie can explain better things
than me :-)

clear enough, bug 570650 had some interesting reading.  I was unaware
of yaml, it looks a lot nicer than gconf / gsettings /
user-settings.py / hand written parser / many other things I can't
think of, I would happily
support using something similar for orca configuration.  If other
people are interested I would take a look at writing a back end to the
settings manager idea to support this.

have a great day :-)
and thanks for making me discover yaml!

Trev

Cheers :-)

[1] http://git.gnome.org/browse/orca/commit/?id=759c61df50e61c92c274cf5a9461945bd267d54b
[2] http://git.gnome.org/browse/orca/commit/?id=49af893c1894821ef0f868aebf75e42c716db8ef
[3] http://live.gnome.org/GnomeGoals/XDGConfigFolders
-- 
Juanje
_______________________________________________
orca-list mailing list
orca-list gnome org
http://mail.gnome.org/mailman/listinfo/orca-list
Visit http://live.gnome.org/Orca for more information on Orca.
The manual is at http://library.gnome.org/users/gnome-access-guide/nightly/ats-2.html
The FAQ is at http://live.gnome.org/Orca/FrequentlyAskedQuestions
Netiquette Guidelines are at http://live.gnome.org/Orca/FrequentlyAskedQuestions/NetiquetteGuidelines
Log bugs and feature requests at http://bugzilla.gnome.org
Find out how to help at http://live.gnome.org/Orca/HowCanIHelp



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