gdesklets includes shared mime info files

Bug #264043 reported by Xiyue Deng
2
Affects Status Importance Assigned to Milestone
gDesklets
Fix Released
Medium
MarioGonzalez
Nominated for 0.3x by Rhett Trappman

Bug Description

[Forwarded from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=497370 . Originally reported by Cesare Tirabassi <email address hidden>]

Cesare Tirabassi <email address hidden>:
> Hi,
>
> gdesklets includes in the package a number of shared mime info files:
>
> /usr/share/mime/packages/gdesklets.xml
> /usr/share/mime/application/x-gdesklets-display.xml
> /usr/share/mime/globs2
> /usr/share/mime/types
> /usr/share/mime/generic-icons
> /usr/share/mime/icons
> /usr/share/mime/treemagic

> Only /usr/share/mime/packages/gdesklets.xml should be included, all others are
> created by running update-mime-database during build.

Based on this analysis, I've prepared a patch with Loïc Minier's help, which tests whether $(DESTDIR) is set with the original $(UPDATE_MIME_DATABASE) tests. As in our builds $(DESTDIR) is set so there will be no call to $(UPDATE_MIME_DATABASE), but reserve to possibility to call it in case it is desired.

Thanks.

Revision history for this message
Xiyue Deng (manphiz) wrote :
Revision history for this message
Christian Meyer (chrisime) wrote : Re: [Bug 264043] Re: gdesklets includes shared mime info files

Should be pushed upstream. Bjoern?

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

DESTDIR=/some/path make distcheck will not fail if we apply this patch but the issue here is IMHO: when should we run the update-mime-database? and should we do it?

In Mandriva we've got to do this when we build our package:

(some content in the gdesklets.spec file)
#remove mime related stuff
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mime/application
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/mime/{globs,magic,XMLnamespaces,aliases,subclasses,mime.cache}
rm -f ${RPM_BUILD_ROOT}%{_datadir}/applications/mimeinfo.cache

So I think this patch does not fix the main problem, just a workarround in Debian.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

As the mime infos are also causing some trouble with the "make distclean" in the upcoming 0.36.1 I guess we should be looking for a clean solution. Looks to me that the problem is located in our makefile(s) so I guess we shouldn't be pushing it upstream ?!

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

IMVHO we should remove the support for execute update-mime-database. Linux vendors (Debian, Mandriva,....) must worry about it and not developers.

So I think we've got 2 options:

  1) To get rid of update-mime-database execution in gdesklets and provide the XML file only.
  2) include a --disable-mime-database in configure.in

I like 1) because every (all?) Linux distributions can update the mime database. And if someone wants to install gdesklets using source code, he/she is still able to execute commands :-) like this one. Also, 1) is faster than develop a new feature.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

Is is bug solved by removing the update-mime-database from the configure.in file like posted on the mailing list and included in the (upcoming) 0.36.1 release ?

--- snip ---
=== modified file 'configure.in'
--- configure.in 2008-09-04 08:37:58 +0000
+++ configure.in 2008-10-28 21:03:24 +0000
@@ -74,8 +74,6 @@
 AC_SUBST(X11_CFLAGS)
 AC_SUBST(X11_LIBS)

-PKG_CHECK_MODULES(SHARED_MIME_INFO, shared-mime-info)
-AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database)
 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database)
--- snap ---

What about the XML file mentioned above (comment 5)?

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

That file?
/usr/share/mime/packages/gdesklets.xml

AFAIK, this file is needed for vendors to make packages.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

So, if your patch fixes the MIME issue and there is the gdesklets.xml file available... can we close this bug ?

Revision history for this message
MarioGonzalez (gonzalemario) wrote :

Bjoern, let me do a few tests before close this because I think there are more things that should be removed.

Changed in gdesklets:
assignee: nobody → gonzalemario
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Joe Sapp (sappj) wrote :

Mario, any update on this? I agree with your comment #5 that distributors should be generating the database.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

OK, I think this should be fixed before 0.36.2 (final) is released.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

So, this bug has been fixed with rev. #126, right ?

Changed in gdesklets:
milestone: none → release-of-0.36.2
Revision history for this message
Bjoern Koch (h.humpel) wrote :

OK, as far as I can tell this has been committed to the 0.3x branch a while ago and will be released with 0.36.2, right ?

Changed in gdesklets:
status: In Progress → Fix Committed
Revision history for this message
Bjoern Koch (h.humpel) wrote :

Released with gDesklets 0.36.2.

Changed in gdesklets:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.