#2262 closed defect (fixed)
bundlebuilder doesn't install mimetypes.xml
Reported by: | sascha_silbe | Owned by: | erikos |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | 0.84.x |
Severity: | Blocker | Keywords: | |
Cc: | sridhar | Distribution/OS: | |
Bug Status: | New |
Description
sugar.activity.bundlebuilder.Installer doesn't install the mimetypes.xml on ./setup.py install. This causes files on external media (where we have to guess the MIME type based on the file extension) not to be associated with the activity.
In the case of Restore (an activity to read back Journal backups in Multi-JEB format) this prevents the activity from working at all, thus setting severity to Blocker.
The workaround is to make an XO bundle (using dist_xo) and install it manually (from the Journal).
Change History (10)
comment:1 Changed 13 years ago by garycmartin
comment:2 Changed 13 years ago by erikos
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #970.
comment:3 Changed 13 years ago by erikos
- Resolution duplicate deleted
- Status changed from closed to reopened
- Version changed from Git as of bugdate to 0.84.x
Actually closing the other one and here is what I commented in the other bug. Setting the version to 0.84 as it is already available there.
The installation should include the mimetype the activities define to $prefix/share/mime/application/. The ActivityBundle.install method is doing this. This effects activities installed by rpms for example.
comment:4 Changed 13 years ago by erikos
I created a downstream ticket with reference two easily reproducible issues I am aware of: http://dev.laptop.org/ticket/10427
In the case of the OLPC images we do just unzip the content of the .xo to the Activities folder in HOME without taking the mimetype into account.
comment:5 Changed 13 years ago by erikos
As we do create the ActivityBundle in the config of the bundlebuilder we can use the code from the activitybundle as well to install the mime type.
Works fine here.
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py index fc8ebc8..dd7c849 100644 --- a/src/sugar/activity/bundlebuilder.py +++ b/src/sugar/activity/bundlebuilder.py @@ -274,6 +274,8 @@ class Installer(object): shutil.copy(source, dest) + self.config.bundle.install_mime_type(self.config.source_dir) + def cmd_dev(config, args): '''Setup for development'''
comment:6 Changed 13 years ago by erikos
- Resolution set to fixed
- Status changed from reopened to closed
comment:7 Changed 12 years ago by sridhar
- Cc sridhar added
comment:8 Changed 12 years ago by RafaelOrtiz
this could be affecting sacha's backup/restore at least for sugar < 0.90
0
comment:9 Changed 10 years ago by dnarvaez
- Component changed from sugar-toolkit to Sugar
This may also cause problems for the Journal 'send to friend' feature as each side needs to recognize the objects mime type for it to be of any use once received. I need to remember to test this work flow.