[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: shared-mime-info dependency
From:       Pedro Lopez-Cabanillas <pedro.lopez.cabanillas () gmail ! com>
Date:       2010-06-30 22:14:36
Message-ID: 201007010014.36515.pedro.lopez.cabanillas () gmail ! com
[Download RAW message or body]

On Wednesday, June 30, 2010, Anne-Marie Mahfouf wrote:
> Hi,
>
> I was wondering why this is not a required dependency since programs cannot
> open without it. Or is it only because I build from KDE sources that I miss
> it?

When some package installs a new XML file with mime type definitions in  
${XDG_MIME_INSTALL_DIR}, the install procedure should run the script 
update-mime-database. This script may be invoked as a post-install step by a 
package manager.

That is exactly what happens with my Drumstick library 
(http://drumstick.sf.net, it is a dependency of KMid and others). The main 
CMakeLists.txt has this line:

	INSTALL( FILES drumstick.xml DESTINATION share/mime/packages )

That is only copying the XML file into the destination directory, and must be 
processed after the installation. In the provided RPM spec, I have:

	PreReq: shared-mime-info
	...
	%post
	%{_bindir}/update-mime-database %{_datadir}/mime
	%postun
	%{_bindir}/update-mime-database %{_datadir}/mime

So if you have installed it, or a similar library from sources, you probably 
missed the execution of the script, and it is my fault (or the authors of the 
other package you installed from sources).

There is a CMake macro for this task, update_xdg_mimetypes() that is defined 
in FindSharedMimeInfo.cmake. This macro is used in 
kdelibs/mimetypes/CMakeLists.txt, so it is already a dependency of KDE.

Regards,
Pedro
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic