Review Request: When a source file for kconf_update does not exist, do not create it

Oswald Buddenhagen ossi at kde.org
Mon Jun 7 16:30:49 BST 2010



> On 2010-06-07 12:48:15, Oswald Buddenhagen wrote:
> > > The QFileInfo checks if the file is actually present in the user's config directory,
> > > the other check is based on merged content.
> > >
> > hmm, but that's just right. if there is no user config, but the system wide config contains info which needs updating, an updated user config needs to be created. of course that means that if the system config is a pristine one as installed by us, it needs to be fixed. and the installed files should probably contain version tags, so no user-specific files would have to be created.
> >
> 
> Lubos Lunak wrote:
>     The system config can come from distribution, can differ from KDE's defaults (of course, that's the point) and can over time become obsolete in their format.
>     
>     So the check is indeed unsufficient and the patch is broken in this form.
>
> 
> Kevin Krammer wrote:
>     So somthing like:
>     - check if the file is locally available
>     - if not, remember that but continue anyways
>     - at the end check whether the config is still equal to the initial state and if yes and it didn't exist locally, remove it again
>     
>     no file + no change -> no file?

that sounds about right


- Oswald


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4243/#review6010
-----------------------------------------------------------


On 2010-06-07 11:38:56, Kevin Krammer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4243/
> -----------------------------------------------------------
> 
> (Updated 2010-06-07 11:38:56)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> Currently, when kconf_update is being run by kdeinit4 on a new user account, it creates all config files that it has updates for, regardless whether these files exist.
> Which mean .kde/share/config gets populated with a lot of files with only kconf_update's entry in them.
> 
> Unfortunately that means that programs checking for a specific file's existance, e.g. PIM apps which are checking whether to run a migrator tool, will be fooled into assuming that there are actually valid settings.
> 
> The patch uses the already set m_skipFile flag to decide when not to sync the KConfig object, thus not creating the file if it didn't exist before
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kconf_update/kconf_update.cpp 1135468 
>   /trunk/KDE/kdelibs/kconf_update/tests/test_kconf_update.h 1135468 
>   /trunk/KDE/kdelibs/kconf_update/tests/test_kconf_update.cpp 1135468 
> 
> Diff: http://reviewboard.kde.org/r/4243/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin
> 
>





More information about the kde-core-devel mailing list