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

Lubos Lunak l.lunak at kde.org
Mon Jun 7 14:05:51 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.
> >

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.


- Lubos


-----------------------------------------------------------
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