[Pkg-sugar-devel] Packaging activities with mimetypes.xml files in Debian

Martin Abente martin.abente.lahaye at gmail.com
Thu Apr 30 21:07:11 UTC 2015


Hello everyone,

While packaging activities that contained a "mimetypes.xml" file like in
FotoToon [1], I noticed in the resulting package some "unexpected" files
being included under "/usr/share/mime/".

These files are created by "update-mime-database" [2] when running
bundlebuilder via "python setup.py install" for installing activities
[3,4]. In the context of packaging activities with CDBS helpers, this
happens during "install" routine [5].

The issue with these files is that they clash with the same files provided
by other packages (ie., a package for another activity with a
"mimetypes.xml" file like StopWatch [6]), and this prevents the packages
from being installed.

The problem seems to be that bundlebuilder wasn't prepared to be used like
this. I prepared a patch [7] to prevent update-mime-database execution, it
will requires to include a "--no-mime-update" argument to "./setup.py
install" and to run update-mime-database in a further step, after the
package is being installed. What do you guys think of this approach?

There is also another issue with symlinks created by bundlebuilder [8] when
installing mimetypes.xml, but not sure how it can be solved yet.

Regards,
Martin.

PS: I CC'ing Peter in case this information is useful for Fedora.

Refs:
1.
https://github.com/godiard/fototoon-activity/blob/master/activity/mimetypes.xml
2. http://linux.die.net/man/1/update-mime-database
3.
https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/bundlebuilder.py#L275
4.
https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L346
5.
https://anonscm.debian.org/cgit/collab-maint/cdbs.git/tree/1/class/python-sugar.mk.in#n121
6.
https://github.com/tchx84/stopwatch-activity/blob/v18-branch/activity/mimetypes.xml
7.
https://github.com/tchx84/sugar-toolkit-gtk3/commit/bcada0f14d6258e09d2e0348f387e56e00ec8a2b
(not to be merged yet)
8.
https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L345
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-sugar-devel/attachments/20150430/d7abf767/attachment.html>


More information about the pkg-sugar-devel mailing list