Discussion:
recommendations for install of applications and update of MIME cache
Carnë Draug
2015-03-02 19:18:56 UTC
Permalink
Hi

I have an application that as part of its install target (using make),
installs a desktop entry file with "desktop-file-install". This
application handles files of specific MIME types (listed on the desktop
file) and so it uses the "--rebuild-mime-info-cache" option.

The problem with this is that during uninstall, the file
"share/applications/mimeinfo.cache" is left behind and distcheck
complains about it.

I was wondering if this tool is really to be used as part of the
installation of the application. Or is it meant for downstream packagers
with package managers running them after the installation? What is
the recommendation for applications? Should they leave it up for
downstream packagers? Expect that users building from source will
update the mime database themselves? Is there some other cleaner way
to do this (I saw some changes on other projects where they replace the
"--rebuild-mime-info-cache" with a separate call to "update-desktop-database",
but why is that?).

If it makes any difference, the application I am asking is GNU Octave,
which has a bug about it [1].

Thank you,
Carnë

[1] https://savannah.gnu.org/bugs/?44404
Jerome Leclanche
2015-03-02 19:24:48 UTC
Permalink
This is something that is handled by the downstream packagers and you
should not worry about it.

Example:
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/PKGBUILD
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/kdenlive.install
J. Leclanche
Post by Carnë Draug
Hi
I have an application that as part of its install target (using make),
installs a desktop entry file with "desktop-file-install". This
application handles files of specific MIME types (listed on the desktop
file) and so it uses the "--rebuild-mime-info-cache" option.
The problem with this is that during uninstall, the file
"share/applications/mimeinfo.cache" is left behind and distcheck
complains about it.
I was wondering if this tool is really to be used as part of the
installation of the application. Or is it meant for downstream packagers
with package managers running them after the installation? What is
the recommendation for applications? Should they leave it up for
downstream packagers? Expect that users building from source will
update the mime database themselves? Is there some other cleaner way
to do this (I saw some changes on other projects where they replace the
"--rebuild-mime-info-cache" with a separate call to "update-desktop-database",
but why is that?).
If it makes any difference, the application I am asking is GNU Octave,
which has a bug about it [1].
Thank you,
Carnë
[1] https://savannah.gnu.org/bugs/?44404
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Carnë Draug
2015-03-02 20:15:41 UTC
Permalink
I understand that, and I have always noticed that Debian seems to update
a bunch of desktop stuff as part of post-install scripts. But then this
assumes that users installing from source are really expected to update
the mime database themselves. And that they know how to do it. Is this
really reasonable? It may be, like running ldconfig after install, but
updating mime cache seems to me to be a bit more obscure.

Carnë
Post by Jerome Leclanche
This is something that is handled by the downstream packagers and you
should not worry about it.
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/PKGBUILD
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/kdenlive.install
J. Leclanche
Post by Carnë Draug
Hi
I have an application that as part of its install target (using make),
installs a desktop entry file with "desktop-file-install". This
application handles files of specific MIME types (listed on the desktop
file) and so it uses the "--rebuild-mime-info-cache" option.
The problem with this is that during uninstall, the file
"share/applications/mimeinfo.cache" is left behind and distcheck
complains about it.
I was wondering if this tool is really to be used as part of the
installation of the application. Or is it meant for downstream packagers
with package managers running them after the installation? What is
the recommendation for applications? Should they leave it up for
downstream packagers? Expect that users building from source will
update the mime database themselves? Is there some other cleaner way
to do this (I saw some changes on other projects where they replace the
"--rebuild-mime-info-cache" with a separate call to "update-desktop-database",
but why is that?).
If it makes any difference, the application I am asking is GNU Octave,
which has a bug about it [1].
Thank you,
Carnë
[1] https://savannah.gnu.org/bugs/?44404
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Jerome Leclanche
2015-03-02 20:46:00 UTC
Permalink
Yes, it's reasonable.
J. Leclanche
Post by Carnë Draug
I understand that, and I have always noticed that Debian seems to update
a bunch of desktop stuff as part of post-install scripts. But then this
assumes that users installing from source are really expected to update
the mime database themselves. And that they know how to do it. Is this
really reasonable? It may be, like running ldconfig after install, but
updating mime cache seems to me to be a bit more obscure.
Carnë
Post by Jerome Leclanche
This is something that is handled by the downstream packagers and you
should not worry about it.
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/PKGBUILD
https://projects.archlinux.org/svntogit/community.git/tree/kdenlive/trunk/kdenlive.install
J. Leclanche
Post by Carnë Draug
Hi
I have an application that as part of its install target (using make),
installs a desktop entry file with "desktop-file-install". This
application handles files of specific MIME types (listed on the desktop
file) and so it uses the "--rebuild-mime-info-cache" option.
The problem with this is that during uninstall, the file
"share/applications/mimeinfo.cache" is left behind and distcheck
complains about it.
I was wondering if this tool is really to be used as part of the
installation of the application. Or is it meant for downstream packagers
with package managers running them after the installation? What is
the recommendation for applications? Should they leave it up for
downstream packagers? Expect that users building from source will
update the mime database themselves? Is there some other cleaner way
to do this (I saw some changes on other projects where they replace the
"--rebuild-mime-info-cache" with a separate call to "update-desktop-database",
but why is that?).
If it makes any difference, the application I am asking is GNU Octave,
which has a bug about it [1].
Thank you,
Carnë
[1] https://savannah.gnu.org/bugs/?44404
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Loading...