automatic kbuildsycoca recreate when home dir and/or install dir changes

David Faure faure at kde.org
Sun Apr 6 23:02:27 BST 2008


On Friday 04 April 2008, Ralf Habacker wrote:
> Hi,
> 
> appended is a patch for kbuildsycoca which checks a changed home and/or
> install directory and triggers a complete recreate of the ksycoca
> database in those cases. This is required for usb stick installations.
> 
> The patch is currently limited to windows, although it may also be
> usefull for unix os. In that case i would remove the conditionals.

Yes this would be most useful, on unix too, please commit without ifdefs.


In fact it makes me think again about my idea of having one ksycoca per value of kfsstnd_prefixes,
and a config file (ksycocarc?) to do the mapping...

... pasting from my 27/03/2006 email: ...

[/opt/kde3]
FileName=ksycoca1
[/d/kde/inst/kofficedir:/d/kde/inst/kde3]
FileName=ksycoca2

This way, for a given value of KDEDIRS, the code can easily lookup the ksycoca to
use, and two sessions of KDE with different parameters will stop overwriting
each other's ksycoca.

... end paste...

Of course this is all "for a given value of $KDEHOME". When using another kdehome you end
up with another ksycocarc, just like right now you end up with a different ksycoca.

This is happening to me right now with kdelibs-4.0 and kdelibs-trunk on the same computer,
and even though I don't run both as a user, the unit tests from both use KDEHOME=~/.kde-unit-test
so I have to remove the ksycoca db by hand if I don't want mixups happening...

What do you think about my proposed solution?

One problem would be when to delete old ksycocas (from kdehome and from ksycocarc); 
the only solution I can think of is "when all prefixes for that ksycoca don't exist anymore"...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list