retitle 749582 qgo: installs a generated XML mime type
tag 749582 + patch
thanks

Hi,

the real issue is in qgo itself.

What happens is that qgo is installing a generated XML mime type [1]
directly to /usr/share/mime/text, without its XML mime type
definition in /usr/share/mime/packages, so update-mime-database will
just remove /usr/share/mime/text/x-sgf.xml (and the rest of the
content of that directory) at the next run, without creating a new
XML mime type.

Furthermore, the generated mime type definition is installed with the
wrong file name even, since a text/go-sgf mime type should be in
/usr/share/mime/text/go-sgf.xml.

On the other hand, shared-mime-info is already providing a mime type
for *.sgf files, called application/x-go-sgf, and already shipped for
many years already (the latest change to that was in 2007, so since
shared-mime-info 0.20+).

Thus, the fix is to just not install that generated XML file anymore,
since as it is now is
a) useless (it has no definition, so gets removed by
   update-mime-database)
b) harmful (it conflicts with an existing mimetype shipped by
   shared-mime-info)
Patch attached for it (ideally upstream could also drop src/x-sgf.xml
altogether).

Ah, side note while I looked at qgo' sources: src/sgf.desktop, which
gets installed to /usr/share/mimelnk, is a KDE 3 only mime type, so
there is not much use for it.

[1] you can see the self-explaining
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  comment in x-sgf.xml

Thanks,
--
Pino
Author: Pino Toscano <p...@debian.org>
Description: stop installing generated XML mime type
 x-sgf.xml is a generated XML mime type without a proper definition, so
 installing it in one of the directories of generated XML mime types causes
 its deletion at the next update-mime-database run.
 .
 Furthermore, shared-mime-info is providing application/x-go-sgf for *.sgf
 files since many years, so there is no need for a mime type for it.
Last-Update: 2014-09-14
Bug-Debian: https://bugs.debian.org/749582

--- a/src/src.pro
+++ b/src/src.pro
@@ -180,9 +180,7 @@ linux-* {
     INSTALLS += desktopfile
     filetype.path = /usr/share/mimelnk/text
     filetype.files = sgf.desktop
-    mimetype.path = /usr/share/mime/text
-    mimetype.files = x-sgf.xml
-    INSTALLS += filetype mimetype
+    INSTALLS += filetype
 }
 
 isEmpty(QMAKE_LRELEASE) {

Reply via email to