Unknown media types in /usr/share/mime/packages/kde.xml

Bug #289592 reported by Laurent Bonnaud
564
This bug affects 123 people
Affects Status Importance Assigned to Milestone
kdelibs
Won't Fix
Low
shared-mime-info
Won't Fix
Wishlist
kde4libs (Ubuntu)
Confirmed
Low
Unassigned
shared-mime-info (Debian)
Confirmed
Unknown
shared-mime-info (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Here is the problem:

# update-mime-database /usr/share/mime
[...]
Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

It seems to come from this file:
  /usr/share/mime/packages/kde.xml

Revision history for this message
In , Bastien Nocera (hadess-deactivatedaccount) wrote :

(From update of attachment 17837)
There's already a -V for verbose, we should use that instead.

Revision history for this message
In , Drago01 (drago01) wrote :

So we should not print warnings unless in verbose mode?
Some messages like "Please run as root" are warnings and they should show up by default.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

Here is the problem:

# update-mime-database /usr/share/mime
[...]
Unknown media type in type 'uri/mms'

Unknown media type in type 'uri/mmst'

Unknown media type in type 'uri/mmsu'

Unknown media type in type 'uri/pnm'

Unknown media type in type 'uri/rtspt'

Unknown media type in type 'uri/rtspu'

It seems to come from this file:
  /usr/share/mime/packages/kde.xml

Revision history for this message
Harald Sitter (apachelogger) wrote :

The issue is really in shared-mime-info, which whines about KDE's fake mimetypes (it has every right to do that), but should allow us (distributions) to make it not do that.

Anyway, moving bug to shared-mime-info, adding debian bug and fdo bug.

Changed in shared-mime-info:
status: Unknown → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

not really a bug but a mimetype wrong used, there is no real reason to not display warnings there

Changed in shared-mime-info:
assignee: nobody → desktop-bugs
importance: Undecided → Wishlist
status: New → Triaged
Changed in shared-mime-info:
status: Unknown → Confirmed
Revision history for this message
Uqbar (uqbar) wrote :

... and then?

Revision history for this message
David Favor (davidfavor) wrote :

Problem still exists in Karmic Alpha 5 released today.

Revision history for this message
In , Samuli Suominen (ssuominen) wrote :

Also a problem for us in Gentoo.

While I agree that KDE shouldn't be defining these at all,
they should only show up with some switch.

http://bugs.gentoo.org/261446

Revision history for this message
seph (seph) wrote :

This bug still exists. Though it's just a warning message, it remains annoying and looks pretty sloppy.

Revision history for this message
In , pva (pva) wrote :

I'm not sure, but why

https://bugs.launchpad.net/ubuntu/+source/shared-mime-info/+bug/289592
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469833
http://bugs.gentoo.org/261446

mention this bug as a "fix"? It looks like kde.xml does something unusual and either this should became allowed in specification or prohibited. But in any case trying to hide the problem does not sound like a good solution. So I guess the real question here is, what do do with the following mime:

  <!-- all/ fake mime types -->
  <mime-type type="all/all">
    <comment>all files and folders</comment>
  </mime-type>

Should update-mime-database warn about them or ignore?

Revision history for this message
Björn Schließmann (b-schliessmann) wrote :

Still in Lucid Alpha 3

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

Still in lucid RC:

Package: shared-mime-info
Version: 0.71-1ubuntu2

Revision history for this message
Vik (vik-catalyst) wrote :

Still in Lucid release as of 3-June-2010

Revision history for this message
Sebastien Bacher (seb128) wrote :

The bug is still open for a reason, could people stop adding comment saying it's still an issue and use the built in option in launchpad to see they get the issue if they care about it?

Changed in shared-mime-info (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug is with whatever ships the kde.xml definitions though not with shared-mime-info

Revision history for this message
Thespian (jesse-mundis) wrote :

I only started getting this problem when I did an "apt-get auto-remove" just after adding in the "suggested other packages" for
"exaile" (an audio player program written in python). The extras I installed (which did not trigger this wash of warning messages) were:

sudo apt-get install exaile-plugin-contextinfo exaile-plugin-ipod streamripper ipython exfalso

It was only after that, when I next did auto-remove that I saw the uri warnings.

Is there an easy fix, or package to remove to make those warnings go away?

Thanks.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> Is there an easy fix, or package to remove to make those warnings go away?

yes, uninstall "kdelibs5-data" which is the buggy binary

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. While we appreciate your issue, it would be better if it was tracked at https://bugs.kde.org, so that the KDE developers can deal with this speedily and have direct communication with you as the reporter for more effective debugging.

Thanks!

Changed in kde4libs (Ubuntu):
status: New → Invalid
Changed in shared-mime-info:
importance: Unknown → Wishlist
Revision history for this message
Popa Adrian Marius (mapopa) wrote :

Here is how i fixed , deleted thouse lines and got no errors after that

http://mapopa.blogspot.com/2011/01/fixing-unknown-media-type-in-type.html

Changed in shared-mime-info:
importance: Wishlist → Unknown
Changed in shared-mime-info:
importance: Unknown → Wishlist
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug is still in natty in this package version:

Package: shared-mime-info
Version: 0.90-1ubuntu1

Revision history for this message
Removed by request (removed1836289) wrote :

adys@azura:/usr/share/mime/packages$ ack allfiles
kde.xml
186: <mime-type type="all/allfiles">

adys@azura:/usr/share/mime/packages$ dlocate /usr/share/mime/packages/kde.xml
kdelibs5-data: /usr/share/mime/packages/kde.xml

adys@azura:/usr/share/mime/packages$ sudo rm kde.xml
adys@azura:/usr/share/mime/packages$ sudo apt-get install --reinstall shared-mime-info kdelibs5-data
Preparing to replace kdelibs5-data 4:4.6.2-0ubuntu4 (using .../kdelibs5-data_4%3a4.6.2-0ubuntu4_all.deb) ...
Unpacking replacement kdelibs5-data ...
Preparing to replace shared-mime-info 0.90-1ubuntu3 (using .../shared-mime-info_0.90-1ubuntu3_amd64.deb) ...
Unpacking replacement shared-mime-info ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Setting up kdelibs5-data (4:4.6.2-0ubuntu4) ...
Setting up shared-mime-info (0.90-1ubuntu3) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Unknown media type in type 'interface/x-winamp-skin'

Why is this invalid in kde4libs? This is where it comes from. interface/x-winamp-skin is a stupid mimetype, the uri/ mimetypes should be replaced by x-scheme-handler/ mimetypes as defined in http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#id2869854
Ass for the all/ mimetypes, god knows what those are.

And a quick grep on the sources:

adys@azura:~/tmp/kde4libs-4.6.2$ ack allfiles
kded/kbuildservicefactory.cpp
159: // TODO do the same for all/all and all/allfiles, if (!KServiceTypeProfile::configurationMode())

kdecore/services/kservicetypeprofile.h
70: * and all/allfiles are excluded from the results of the queries.

kio/kio/kfileitemactions.cpp
348: *it == "allfiles" /*compat with KDE up to 3.0.3*/) {
355: *it == "all/allfiles") {

kio/tests/kfstest.cpp
114: filter << "all/allfiles" << "text/plain";
115: dlg->setMimeFilter( filter, "all/allfiles" );

kio/tests/kfdtest.cpp
23: filter << "all/allfiles" << "text/plain";
24: dlg->setMimeFilter( filter, "all/allfiles" );

mimetypes/kde.xml
186: <mime-type type="all/allfiles">
adys@azura:~/tmp/kde4libs-4.6.2$ ack "uri/"
mimetypes/kde.xml
190: <!-- uri/ fake mime types -->
191: <mime-type type="uri/mms">
194: <mime-type type="uri/mmst">
197: <mime-type type="uri/mmsu">
200: <mime-type type="uri/pnm">
203: <mime-type type="uri/rtspt">
206: <mime-type type="uri/rtspu">
adys@azura:~/tmp/kde4libs-4.6.2$ ack winamp-skin
kded/tests/kmimeassociationstest.cpp
352: // #178560: Removing ark from interface/x-winamp-skin didn't work
353: const QString mime = "interface/x-winamp-skin";
358: "interface/x-winamp-skin=fakearkapplication.desktop;\n"));

mimetypes/kde.xml
350: <mime-type type="interface/x-winamp-skin">

Changed in kde4libs (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug is still in oneiric in this package version:

Package: shared-mime-info
Version: 0.90-1ubuntu4

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug is still in precise in this package version:

Package: shared-mime-info
Version: 1.0-0ubuntu1

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Re-closing as per comment 18

Changed in kde4libs (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Joni-Pekka Kurronen (joni-kurronen) wrote :

same whit google earth installation:

joni@kurrola:~$ sudo gdebi googleearth_6.0.3.2197+0.7.0-1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Google Earth, a 3D map/planet viewer
 Package built with googleearth-package.
Do you want to install the software package? [y/N]:y
(Reading database ... 771737 files and directories currently installed.)
Preparing to replace googleearth 6.0.3.2197+0.7.0-1 (using googleearth_6.0.3.2197+0.7.0-1_amd64.deb) ...
Unpacking replacement googleearth ...
Setting up googleearth (6.0.3.2197+0.7.0-1) ...
Processing triggers for shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Processing triggers for menu ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...

joni@kurrola:~$

Revision history for this message
richud (richud.com) wrote :

still same issue in 12.04 !

Revision history for this message
richud (richud.com) wrote :

actually you can fix it simply by doing

$ sudo rm /usr/share/mime/packages/kde.xml
$ sudo update-mime-database /usr/share/mime

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could people stop commenting on that bug, KDE is known to be broken, use the "also affects me" button if you want to register you get the issue, no need to "spam" every subscribed to confirm that this bug is still there when it didn't get closed

Revision history for this message
NoOp (glgxg) wrote :

@Sebastien:
Unfortunately this bug is still present & without comment will most likely continue to be ignored. Here we are nearly 6 years later...

"Reported by Laurent Bonnaud on 2008-10-26"

Revision history for this message
Sebastien Bacher (seb128) wrote :

Well, that's not an important issue and patches are welcome I guess

Rolf Leggewie (r0lf)
tags: added: trusty
Revision history for this message
Peter Funk (pf-artcom-gmbh) wrote :

I guess I'm not the only one who get's tired by applying the ugly workaround
    $sudo vi /usr/share/mime/packages/kde.xml
to remove the fake mime type entries from that file every once in a while,
because an update has supplied a fresh version of the package 'kdelibs5-data'.
I would like to contact some developer able to apply a patch to this file.
Is one of these persons subscribed to this bug here or can I reach one over
the list <email address hidden> ?

Revision history for this message
OldeFoxx (oldefoxx) wrote :

This bug just surfaced in Ubuntu 14.04 after doing an update a few days ago. I did a locate kde.xml, as ir was mentioned in another comment, and found it here:
/usr/share/mime/packages/kde.xml

I guess some program had it down as a dependency, so now I have it under gnome.

Revision history for this message
brian (byork9) wrote :

it seems to stem from ...
Processing triggers for shared-mime-info (1.2-0ubuntu3) ...

Ken Sharp (kennybobs)
tags: added: i386 precise
Revision history for this message
Dean Montgomery (dmonty) wrote :

In package shared-mime-info there is update-mime-database.c and around line 51 there is a hard-programmed list of mime types used to flag invalid MIME types

================
/* This is the list of directories to scan when finding old type files to
 * delete. It is also used to warn about invalid MIME types.
 */
const char *media_types[] = {
  "text",
  "application",
  "image",
  "audio",
  "inode",
  "video",
  "message",
  "model",
  "multipart",
  "x-content",
  "x-epoc",
  "x-scheme-handler",
};
================

in the get_type function around line 261 the program scans the hard-coded list of mime types or it returns the error that everyone is complaining about.

================
  for (i = 0; i < G_N_ELEMENTS(media_types); i++)
  {
    if (strcmp(media_types[i], type->media) == 0)
      return type;
  }

  g_warning("Unknown media type in type '%s'", name);
================

Dean M.

Revision history for this message
Dean Montgomery (dmonty) wrote :

that `const char *media_types` either needs more added to it or a way to hook in an external file containing that list. Google search turns up some common "Unknown media type":
all
chemical
uri
interface
map
fonts
vms
zz-aplication

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug has finally improved in Ubuntu 17.04. There are only 2 errors left:

# update-mime-database /usr/share/mime
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'

However it is not clear to me which file is responsible for this:

# grep -r all/allfiles /usr/share/mime
/usr/share/mime/all/allfiles.xml:<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="all/allfiles">
/usr/share/mime/packages/kde.xml: <mime-type type="all/allfiles">
/usr/share/mime/types:all/allfiles

tags: added: xenial zesty
removed: i386
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Mathew Hodson (mhodson) wrote :

Comment 14 from https://bugs.kde.org/show_bug.cgi?id=303627 summarizes the current state of this bug.

"I'm taking the liberty to close this report (it was "confirmed" by my vote in the first place).

The fake mimetypes have been removed from kcoreaddons's kde5.xml file: https://github.com/KDE/kcoreaddons/commit/36ff1bf60c9b12c28ed4d7566abceac10cab345e

They still are defined in the old kdelibs package, but we cannot remove them because it would break all the kde4 apps that are still using them. While kdelibs4 is still being released with new bugfixes, most of those kde4 apps are not."

affects: kde4libs (Debian) → ubuntu
no longer affects: ubuntu
Changed in kde4libs (Ubuntu):
status: Invalid → Confirmed
importance: Undecided → Low
Revision history for this message
Mathew Hodson (mhodson) wrote :

It seems this was fixed upstream for KDE Frameworks 5. Not sure if we can backport the fix because of the compatibility problems mentioned.

This is also mentioned in the porting notes for KDE Frameworks 5.

https://community.kde.org/Frameworks/Porting_Notes#Mime_Types

"The following fake MIME types have been removed and should be replaced as follows:

    all/allfiles ➙ application/octet-stream
    all/all ➙ application/octet-stream+inode/directory
    uri/{mms,mmst,mmsu,pnm,rtspt,rtsptu} ➙ x-scheme-handler/..."

Changed in kdelibs:
importance: Unknown → Low
status: Unknown → Won't Fix
Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :

In xubuntu 17.10, kdelibs5-data 4.14.34-0ubuntu2, file /usr/share/mime/packages/kde.xml still includes MIME types all/all and all/allfiles.

Changed in shared-mime-info:
status: Confirmed → Won't Fix
Revision history for this message
alfred (harlock59) wrote :

This bug still exists on xubuntu 18.04 why not fixing this once and for all after all the years ??? is this really important to show this warning or only to warn people ??? what can they do to avoid this message ? update database ? what command-line to do so ?. Though it's just a warning message, it remains annoying and looks pretty sloppy.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

I cannot reproduce the bug in Ubuntu 19.04. Thanks for the fix!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.