KConfig::addConfigSources is broken

Thomas Braxton kde.braxton at gmail.com
Mon Nov 19 04:52:05 GMT 2007


On 11/18/07, Andreas Pakulat <apaku at gmx.de> wrote:
> On 18.11.07 15:53:09, Aaron J. Seigo wrote:
> > > > because of this broken symmetry, how is Andreas supposed to accomplish
> > > > what he wants: a kconfig file used as a template for reads, with a custom
> > > > file to store changes in?
> > >
> > > the way I posted earlier.
> >
> > the way you posted earlier doesn't work. because now instead of having a write
> > problem, he has a read problem. read his issue very carefully and you will
> > see this. this is why symmetry between read/write must be kept!
> >
> > > > (b) this is not how it worked in KConfig from KDE3. this will introduce
> > > > subtle and unnexpected bugs into software. in fact, as you can see, this
> > > > has already happened.
> > >
> > > this function iirc wasn't in kde3, it was added in r563544, so how
> > > does this break kde3 software?
> >
> > it breaks with the concept of read/write symmetry that is part of cascading
> > configurations.
> >
> > it also didn't apparently work that way before the merge.
>
> ?? It did work before the "first" merge - the one I "executed" in
> October (IIRC, can't remember the date exactly). The code in KDevelop
> dates back to something like summer last year and it always worked until
> that first merge (or so I guess, maybe it was the second one done by
> oswald...)
>
> > > > so please change this back to how it was. =)
> > >
> > > ok. so if addConfigSources is called the last file name in the list
> > > becomes the most specific file?
> >
> > i'm really not sure what you're meaning by "specific", but since it seems to
> > have led to an odd situation in the current code, i'm going to use slightly
> > different terms that are hopefully a bit clearer:
> >
> > if addConfigSources is called, the last file should be the one written to
> > since it is the last one read to.
> >
> > alternatively, if addConfigSources is called, the file name passed into the
> > constructor should be the one that is read from last since it is the one that
> > is written to last.
> >
> > either way, the symmetry between read/write needs to be kept.
>
> Yeah, actually I don't care which file I have to use in the openConfig()
> and which file to use in the addConfigSources as long as the symmetry is
> kept.

I tested this, and the symmetry is still there. Try my previous
suggestion and if it still doesn't work, then we have a bug, which
I'll gladly fix. I don't see how opening one file, then expecting
writes to go to a different file is symmetrical, or sensible. But, if
that's the way you want it I can easily change it.




More information about the kde-core-devel mailing list