Bug 343468 - KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown mimetype ... differs in case
Summary: KMimeTypeRepository::parents: "/usr/share/mime/subclasses" refers to unknown...
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: 4.14.0
Platform: Other Linux
: NOR normal with 111 votes (vote)
Target Milestone: ---
Assignee: kdelibs bugs
URL: https://bugs.freedesktop.org/show_bug...
Keywords:
: 343579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-28 16:15 UTC by Rex Dieter
Modified: 2017-08-20 19:08 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rex Dieter 2015-01-28 16:15:32 UTC
With recent versions of shared-mime-info, kde4 applications often include the KWarning output:

kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.binary.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.addin.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.presentation.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.template.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.template.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.template.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.document.macroEnabled.12" 
kdesvn(9797) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slide.macroEnabled.12"

where the mimetype stored on disk differ only in case, ie, use "macroenabled.d12" instead of "macroEnabled.12"

shared-mime-info upstream claims this to be a kde bug, since mimetypes are (should be!) treated in a case-insenstive manner, see also:
https://bugs.freedesktop.org/show_bug.cgi?id=88004#c4

Reproducible: Always
Comment 1 Rex Dieter 2015-01-30 13:32:50 UTC
marking confirmed, it's easily reproducible.
Comment 2 Rex Dieter 2015-02-03 23:35:17 UTC
*** Bug 343579 has been marked as a duplicate of this bug. ***
Comment 3 OpenSUSE User #314 2015-03-24 09:13:09 UTC
So in the meantime the workaround is something like this?

sudo sed -i 's:macroEnabled:macroenabled:g' /usr/share/mime/subclasses
Comment 4 Dieter Nützel 2015-03-24 15:25:46 UTC
(In reply to OpenSUSE User #314 from comment #3)
> So in the meantime the workaround is something like this?
> 
> sudo sed -i 's:macroEnabled:macroenabled:g' /usr/share/mime/subclasses

Seems to be...;-)

WORKS for me, thanks!

openSUSE 13.2
KDE 4.14.6
shared-mime-info-1.4-2.4.1.x86_64
Comment 5 quazgar 2015-03-31 07:20:42 UTC
Also works for me.  Can this be applied upstream?
Comment 6 Dieter Nützel 2015-03-31 19:09:32 UTC
(In reply to Daniel Hornung from comment #5)
> Also works for me.  Can this be applied upstream?

I second this.
It's a pain to apply it every update cycle.
Comment 7 Dieter Nützel 2015-04-22 13:16:12 UTC
PING!
Comment 8 Dieter Nützel 2015-05-20 19:05:39 UTC
Could everyone be so kind to give her/his/its vote, please?
Comment 9 Rex Dieter 2015-05-20 19:14:27 UTC
Voting won't help, but an acceptable patch to fix the code would.  Hint: manually modifying subclasses is not acceptable
Comment 10 quazgar 2015-12-06 16:28:39 UTC
So, if I see the problem correctly, KStandardDirs::locate should provide a case insensitive search as well, and then the correct MimeType should be chosen by KMimeTypeRepository?
Comment 11 EMR_Kde 2016-02-10 13:23:21 UTC
bump?? Still an issue after so long?
Comment 12 Dieter Nützel 2016-02-11 01:16:10 UTC
(In reply to EMR_Kde from comment #11)
> bump?? Still an issue after so long?

Yes.
Sadly, after _every_ update with any mimetype related stuff I have to repeate the above step.
Sorry.
Comment 13 EMR_Kde 2016-03-09 14:44:44 UTC
Same here. 

Bump?? Still an issue after so long? (Again)
Comment 14 Dieter Nützel 2017-08-20 19:08:11 UTC
Seems to be fixed with current Tumbleweed, at least for me.
Could be closed?!