Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82276 - Some KDE config files not preserved when upgrading to a new major version
Summary: Some KDE config files not preserved when upgrading to a new major version
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 12:38 UTC by Adam
Modified: 2005-02-21 06:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2005-02-16 12:38:50 UTC
When I upgrade, say, KDE 3.1 to 3.2 or 3.2 to 3.3, some of my config settings (I've only noticed the settings from Control Center -> System Administration -> Login Manager) are reset to defaults.  This is because the folder they're stored in, which is currently a subfolder of /usr/kde/3.3/, is version-specific.

The tough part is how this should be fixed.  I'm assuming the version-specific folder is there so multiple versions of KDE can be installed at once (though why anyone would want *more* than one KDE on their computer is beyond me).  It seems like what has to happen is, when the version changes, the following steps are performed:
1. Move the old folder (e.g. 3.3) to the new folder (e.g. 3.4)
2. Change CONFIG_PROTECT such that the new folder gets put in it if and only if the old folder was already in it (then the old folder will have to be removed if and only if the old KDE version is being unmerged), and only if it isn't already there
3. Install the files.  CONFIG_PROTECT will keep the user's settings rather than replacing them with the defaults.

I would also like to suggest that /usr/kde/3.3/share/config does not seem like a good location for config files.  I would prefer them to go somewhere in /etc so all my config files are there (for backup purposes, and for other people who like to have a read-only /usr directory).  One way to do this is to allow users to choose the installation directories for various components when emerging them.  In general, it would be really nice if people could pass compilation options to emerge which are passed verbatim to the package's configure script.  USE variables are powerful but sometimes not powerful enough.

Reproducible: Always
Steps to Reproduce:
1.Upgrade kde to a new major version (e.g. 3.2 to 3.3)
2.
3.

Actual Results:  
My login settings are reset to default (so, for example, the login screen
appears rather than logging me in automatically).

Expected Results:  
Kept my settings the same.

adam>emerge info
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.5,
glibc-2.3.3.20040420-r2, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Feb  3 2005, 16:53:49)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks nostrip sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://adelie.polymtl.ca/ ftp://gentoo.mirrors.pair.com/
http://mirror.clarkson.edu/pub/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X alsa arts avi bitmap-fonts cdr crypt cscope cups dvd encode f77
fam font-server foomaticdb gdbm gif gpm gtk2 imagemagick imlib jpeg kde
kdeenablefinal libg++ libwww mmx mpeg mysql ncurses oggvorbis opengl pdflib perl
png ppds qt quicktime readline scanner sdl ssl tcpd tiff truetype truetype-fonts
trusted type1-fonts usb v4l xml2 xmms xprint xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Gregorio Guidi (RETIRED) gentoo-dev 2005-02-17 01:44:50 UTC
I don't think this is worth the effort, as it's use would be nearly always
to protect share/config/kdm/kdmrc, which is the only user-custmizable file
in share/config, and often changes so much between major releases that 
migrating old options is not possible.

About using /usr/kde/3.x/share/config for config files instead of /etc: 
this is not something we are deciding ourselves, see here for instance:
http://www.kde.org/areas/sysadmin/fsh.php
Comment 2 Adam 2005-02-17 10:24:02 UTC
> this is not something we are deciding ourselves

According to my KDE bug report here:

http://bugs.kde.org/show_bug.cgi?id=99241

this is indeed Gentoo's decision.  They say the default location is /usr/local.
Comment 3 Caleb Tennis (RETIRED) gentoo-dev 2005-02-17 10:48:18 UTC
'kde-config --path config' will show you the reverse scan order for configuration directory structure.  you can store your configuration files in alternate directories if you like, nothing is stopping you... read the documentation on KIOSK mode for more info.
Comment 4 Caleb Tennis (RETIRED) gentoo-dev 2005-02-17 10:49:54 UTC
also, the kde default location for apps to store their configuration is "$KDE_INSTALL_DIR/share/config", so even if you install in /usr/local that isn't /etc.  Symlinking is an option, I suppose.

Our setup is designed so you can run multiple KDE versions on the same system.
Comment 5 Adam 2005-02-17 10:58:32 UTC
> you can store your configuration files in alternate directories if you like, nothing is stopping you...

But unless I'm mistaken, what will happen if I try to do that is that when I emerge kde, it will install the new files in the location I don't want, and the files I put in /etc will be outdated, and possibly even incorrect (if KDE changes the format of its files).

For that reason it's necessary for Gentoo itself to have an option to install the files in an alternate location, hence my suggestion to pass compilation options verbatim to the package's configure script.
Comment 6 Caleb Tennis (RETIRED) gentoo-dev 2005-02-17 11:13:58 UTC
You can create local modifications to the eclasses that incorporate the different configure options you'd like to have.

or

You can specify the configuration directory hierarchy via the kiosk framework.  The /etc/kderc file they talked about lets you do that.  You can tell KDE to prefer configuration files in any directory you prefer.
Comment 7 Adam 2005-02-17 11:32:31 UTC
OK.  As for the second option, I don't see how it's much different than modifying the KDEDIRS environment variable.  But I guess I'll have to look into those things.
Comment 8 Caleb Tennis (RETIRED) gentoo-dev 2005-02-17 12:19:09 UTC
The #2 option is pretty much the same as using KDEDIRS, but it'd really be no different than if you were installed kde for yourself into /usr/local.

Also, thinking about this more, are you sure this is even an issue?  Application default configuration files are installed in /usr/kde/3.3/share/config, but all of your local modifications will be installed in $HOME/.kde/share/config...
Comment 9 Adam 2005-02-17 12:26:39 UTC
Most of my configuration is indeed kept across updates, but not configuration that has to be system-wide, which is at least the Login Manager settings.  I have it set to automatically log myself in without the dialog, so every time I upgrade KDE I have to set that option again.

I'll probably eventually stop using kdm.  It seems that if I don't need the dialog, there's no point in running it in the first place... but I have to investigate more to find out other options.

It just seems to me that configuration like that does not belong anywhere in /usr, if I understand the purposes of the various directories.
Comment 10 Caleb Tennis (RETIRED) gentoo-dev 2005-02-17 12:31:15 UTC
You can, via the kderc file, add in a directory that KDE searches.  The search path by default can be seen with "kde-config --path config".  You could, for example, add in another directory before it gets to /usr/kde/3.3/...

The highest directory in the chain, by default, is the installation directory, which is where the default config files go at install time.  However, it doesn't mean you have to put your global configuration files there; you can create an /etc/kde/share/config directory if you like that houses all of your global configuration files, and tell kde via the kderc file to use that directory.
Comment 11 Gregorio Guidi (RETIRED) gentoo-dev 2005-02-21 06:53:59 UTC
Since there are very clean ways to avoid this little nuisance,
I think this bug can be closed now.