I believe several of the mimetypes are miscategorized. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560118 Reproducible: Always
Please explain which packages are affected and how. Since your Debian bug report does not convey any sense either that according to [1] these are wrong, you will have to be explicit about which MIME types you mean and which packages install them. It would also help if you explained which packages have real problems with these MIME types. Warnings and errors of commands that relate to these would be nice, for instance. [1] http://www.iana.org/assignments/media-types/index.html
I'm sorry, I thought it would be obvious. application/x-go-sgf is a problem for me because of software I work on that has the correct categorization of "text". But I'm pretty sure chess pgn and ruby files are also miscategorized. It doesn't cause any bugs that I know of, but they're wrong. Those should be under text according to the mimetypes spec. Look at text/x-csrc, text/x-dsrc, etc., etc., and then consider application/x-ruby?!?!
The freedesktop mime database expresses the text nature of these filetypes by listing them as text/plain subclasses. http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.18.html#subclassing You didn't mention what application is causing problems with the current mime entry, but it might not be using the mime database correctly. There are various libraries for accessing it, and maybe they don't all pay attention to subclasses? http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec?action=show&redirect=Standards%2Fshared-mime-info-spec#head-08acf7d5628532f446bb7df6ac2535cefba046cf
Actually, the problem is with my application installing .desktop files and another bug with KDE that's unrelated. Long story short, icons are stored in different directories based on mimetype classes so I figured getting x-sgf set to text in the mimetype database was a first step. As for the accuracy of chess and ruby and possibly other mimetypes, I don't know what that would impact so I'm just mentioning those if no one has noticed.
Well I don't think you'll get the freedesktop.org guys to admit that their database is wrong, because it is complying with their spec that says you can indicate text formats by subclassing; I count 47 different filetypes in shared-mime-info-0.60 that are text subclasses but don't start with "text/" So, it seems like the application should be taught to pay attention to /usr/share/mime/subclasses. I gather you're a developer for this application, so you might even make that change yourself. Alternatively, if you think the whole subclassing thing was a design mistake and you want all your text filetypes to start with "text/", you can actually add a file named "Override.xml" to override them locally and rebuild your database (see the spec linked to previously).
Wait, so you're saying its okay for a text subtype to be listed under application? That that complies with the "spec"?
Yes, that's how I read the spec. Did you get a different impression from it?
So basically, someone added a bunch of inaccurate mimetypes and because they're not technically a violation of the spec, no one will ever fix them? Great. Well, whatever, I'll work around it. Thanks for talking me through it anyway.
If that's the way you want to look at it :] In my opinion, the entries are fully in the spirit of the spec, not just valid by a technicality. I think your complaint is with the spec that allows expressing text formats using this new subclass concept, rather than enforcing the old unix mimetype convention where they are all named "text/blah". Ok to close this bug now, since it seems unlikely that you'll get the freedesktop devs to agree that their subclass stuff sucks and they should rename 47 entries using the "text/blah" convention?
Why have a database at all? Why not just call everything application/octet-stream? Its not such a big deal, except that its used to determine directories for icons by KDE and possibly gnome. Which means if I want to use a particular icon, I have to make my application less correct because the mime database is incorrect. Sure, close it, I give up.
I take back the suggestion to close this report right now, if you're willing explain in more detail how KDE is getting things confused with these mimetypes. The "making a long story short" was too short to follow, but given a better explanation it might be apparent that KDE mime library is ignoring mime subclasses. And gnome as well, based on your debian bug report. In which case there could be 2 upstream bug reports filed against KDE and gnome, or possibly just 1 against the shared mime database since there's no use in having stuff in the spec that nobody wants to implement correctly...
This stuff belongs to https://bugs.freedesktop.org and not to Gentoo/Debian/whatever bugtrackers...
This should be reported to the relevant upstream bugtrackers.