<div dir="ltr">Hello everyone,<div><br></div><div>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/".</div><div><br></div><div>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].</div><div><br></div><div>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.<br></div><div><br></div><div>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?</div><div><br></div><div>There is also another issue with symlinks created by bundlebuilder [8] when installing mimetypes.xml, but not sure how it can be solved yet.</div><div><br></div><div>Regards,</div><div>Martin.</div><div><br></div><div>PS: I CC'ing Peter in case this information is useful for Fedora.</div><div><br></div><div>Refs:</div><div>1. <a href="https://github.com/godiard/fototoon-activity/blob/master/activity/mimetypes.xml">https://github.com/godiard/fototoon-activity/blob/master/activity/mimetypes.xml</a></div><div>2. <a href="http://linux.die.net/man/1/update-mime-database">http://linux.die.net/man/1/update-mime-database</a></div><div>3. <a href="https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/bundlebuilder.py#L275">https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/bundlebuilder.py#L275</a></div><div>4. <a href="https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L346">https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L346</a></div><div>5. <a href="https://anonscm.debian.org/cgit/collab-maint/cdbs.git/tree/1/class/python-sugar.mk.in#n121">https://anonscm.debian.org/cgit/collab-maint/cdbs.git/tree/1/class/python-sugar.mk.in#n121</a></div><div>6. <a href="https://github.com/tchx84/stopwatch-activity/blob/v18-branch/activity/mimetypes.xml">https://github.com/tchx84/stopwatch-activity/blob/v18-branch/activity/mimetypes.xml</a></div><div>7. <a href="https://github.com/tchx84/sugar-toolkit-gtk3/commit/bcada0f14d6258e09d2e0348f387e56e00ec8a2b">https://github.com/tchx84/sugar-toolkit-gtk3/commit/bcada0f14d6258e09d2e0348f387e56e00ec8a2b</a> (not to be merged yet)</div><div>8. <a href="https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L345">https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/bundle/activitybundle.py#L345</a></div></div>