doubled entries in ksycoca?
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Sat Jun 28 08:13:29 BST 2008
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:
http://www.cdash.org/CDash/testDetails.php?test=5433226&build=110046
KMimeType::findByUrlHelper() looks for (mimeList.count() == 1) in line 297
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080628/3c7eea64/attachment.sig>
More information about the kde-core-devel
mailing list