doubled entries in ksycoca?
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Mon Jun 30 13:00:38 BST 2008
> Von: David Faure
> Betreff: Re: doubled entries in ksycoca?
> On Saturday 28 June 2008, Christian Ehrlicher wrote:
> > David Faure schrieb:
> > > On Friday 27 June 2008, Christian Ehrlicher wrote:
> > >> Hi,
> > >>
> > >> while trying to fix ksyscocatest on windows I found a problem in my
> > >> ksycoca cache. Some entries doubled.
> > >> Digging a little bit deeper I found out that the doubles are written
> in
> > >> KBuildMimeTypeFactory::savePatternLists() -->
> m_fastPatternDict->save(str)
> > >>
> > >> I added some debug output:
> > >>
> > >> keyStr offset &payload
> > >> "asc" 78230 0x1e7ef58
> > >> "asc" 82709 0x1ea07f8
> > >> "asc" 82709 0x1eb2610
> > >> "asc" 127207 0x1e17c48
> > >
> > > Yes, this simply means you have multiple mimetypes associated with the
> same pattern *.asc.
> > > Same here:
> > > KBuildMimeTypeFactory::savePatternLists: mimeType
> "application/pgp-keys" has patterns ("*.skr", "*.asc", "*.pkr")
> > > KBuildMimeTypeFactory::savePatternLists: mimeType "text/plain" has
> patterns ("*.asc", "*.txt", "*.doc")
> > > KBuildMimeTypeFactory::savePatternLists: mimeType
> "application/pgp-encrypted" has patterns ("*.asc", "*.gpg","*.pgp")
> > >
> > > I added support for KSycocaDict being used as a multihash (multiple
> instances of a key), when I wrote
> > > the shared-mime-info support, see KSycocaDict::findMultiString.
> > > And this is indeed what KMimeTypeFactory::findFromFastPatternDict
> uses, to get all mimetypes matching a given extension.
> > > After that, KMimeType::findByUrlHelper chooses between those mimetypes
> by using sniffing.
> > > I still have to implement the support for the new pattern (=glob)
> priority concept from shared-mime-info,
> > > but it's pointless to do so before more people actually have an
> updated shared-mime-info :)
> > >
> > The problem is that it breaks the kmimetypetest in line 233:
>
> That test is about a foo.txt file that contains a PDF. This is completely
> unrelated to the *.asc pattern.
>
I can send you the same for txt (two entries, same offset). So yes I've more than one entry for txt too (and also for a lot of others).
Christian
--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
More information about the kde-core-devel
mailing list