Problem with desktop file

A lot of problems I have with OBS. I have read this site: https://fedoraproject.org/wiki/Packaging:Guidelines#Desktop_files, so I using


desktop-file-install --rebuild-mime-info-cache tao-makefile-ui.desktop 

command to install desktop file. When I install desktop file in install section, there’s error occurs I have unpacked files, but I won’t package mime cache. When I put installation of desktop file to post section, I have error telling me desktop file isn’t found.

Thanks for help!

Ok. I didn’t read documentation yet, but I think I found an solution. I called desktop-file-install tao-makefile-ui.desktop in install section and /usr/bin/update-desktop-database in post and postun section. It is correct?

On Tue 07 Jul 2015 03:06:03 PM CDT, Lachu wrote:

A lot of problems I have with OBS. I have read this site:
Fedora Packaging Guidelines - Fedora Project Wiki, so I
using

Code:

desktop-file-install --rebuild-mime-info-cache
tao-makefile-ui.desktop

command to install desktop file. When I install desktop file in install
section, there’s error occurs I have unpacked files, but I won’t package
mime cache. When I put installation of desktop file to post section, I
have error telling me desktop file isn’t found.

Thanks for help!

Hi
Unfortunately I don’t package fedora stuff. Perhaps look at some fedora
src rpms that include what your doing and use their method?

Here is the one from gramps for fedora 22;


%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/hicolor || :
touch --no-create %{_datadir}/mime/packages &> /dev/null || :

%postun
update-desktop-database &> /dev/null ||:
if  $1 -eq 0 ]; then
touch --no-create %{_datadir}/icons/hicolor || :
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel
3.12.43-52.6-default If you find this post helpful and are logged into
the web interface, please show your appreciation and click on the star
below… Thanks!