After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 625264 - make call of update-mime-database optional
make call of update-mime-database optional
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-25 23:43 UTC by Christian Krause
Modified: 2010-09-12 19:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the issue (1.98 KB, patch)
2010-07-25 23:43 UTC, Christian Krause
none Details | Review
Do not call update-mime-database if DESTDIR is set (598 bytes, patch)
2010-08-08 12:59 UTC, Bertrand Lorentz
rejected Details | Review
don't run update-desktop-database if DESTDIR is set (589 bytes, patch)
2010-08-15 19:34 UTC, Christian Krause
committed Details | Review

Description Christian Krause 2010-07-25 23:43:55 UTC
Created attachment 166549 [details] [review]
patch to fix the issue

Starting with 1.7.3, banshee calls update-mime-database unconditional (at least when compiling within the source tree) during "make install".

For packaging of banshee this is usually not wanted, because the package is installed into a DESTDIR anyway and so calling update-mime-database would make no sense. That's why the call of these additional tools is usually turned off when running "make install" when building the package and these tools are then called later on in pre/post-install scripts during the (un)installation of the package.

The attached patch adds a --disable-update-mimedb configure option. I have looked at some gnome packages how this is usually done and finally I have adapted the solution used by nautilus.
Comment 1 Bertrand Lorentz 2010-08-08 12:59:31 UTC
Created attachment 167368 [details] [review]
Do not call update-mime-database if DESTDIR is set

With this patch, update-mime-database is not called if DESTDIR is set, instead of checking if we're doing an out of tree build.
I think it's simpler than adding a configure option, and it's the same approach we're already using for the icon cache.

Christian, could you check if that also fixes the issue for you ?
Comment 2 Christian Krause 2010-08-15 19:33:30 UTC
Yes, it does. Since I'm not a gnome-desktop expert, I can't tell whether there are any drawbacks in any of these two variants. ;-)

I've attached a 2nd patch which solves the same problem for running update-desktop-database. It would be great if the call for this tool could be made optional too.
Comment 3 Christian Krause 2010-08-15 19:34:59 UTC
Created attachment 167910 [details] [review]
don't run update-desktop-database if DESTDIR is set
Comment 4 Bertrand Lorentz 2010-08-23 19:45:14 UTC
Comment on attachment 167368 [details] [review]
Do not call update-mime-database if DESTDIR is set

Aaron just fixed the update-mime-database issue the easiest way possible : by remove the call altogether :
http://git.gnome.org/browse/banshee/commit/?id=0c343d68f714608eea03d71540e92df9d178319e

I think my patch was breaking "make distcheck" anyway.

I still need to look into the update-desktop-database issue, so I'm keeping this open for now.
Comment 5 Arun Raghavan 2010-09-01 14:46:56 UTC
FWIW, we're removing both in Gentoo - for GNOME apps we update the mime and desktop databases in a post-install phase. I'm assuming other distributions adopt the same method.
Comment 6 Christian Krause 2010-09-03 19:55:50 UTC
(In reply to comment #5)
> FWIW, we're removing both in Gentoo - for GNOME apps we update the mime and
> desktop databases in a post-install phase. I'm assuming other distributions
> adopt the same method.

I think the suggest configure parameter --disable-update-mimedb is quite often used. It would be much easier for packaging if the package would not install any data which must be deleted afterwards. ;-)
Comment 7 Bertrand Lorentz 2010-09-12 19:44:21 UTC
Comment on attachment 167910 [details] [review]
don't run update-desktop-database if DESTDIR is set

Committed, thanks Christian !
Comment 8 Bertrand Lorentz 2010-09-12 19:44:35 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.