GNOME Bugzilla – Bug 625264
make call of update-mime-database optional
Last modified: 2010-09-12 19:44:35 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.
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 ?
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.
Created attachment 167910 [details] [review] don't run update-desktop-database if DESTDIR is set
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.
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.
(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 on attachment 167910 [details] [review] don't run update-desktop-database if DESTDIR is set Committed, thanks Christian !
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.