[Dextrose] [PATCH][sugar] Copy .xo to removable device hack

Martin Abente martin.abente.lahaye at gmail.com
Wed Mar 16 08:55:53 EDT 2011

Plan Ceibal folks reported that it wasn't possible
to copy .xo files from datastore to removable
devices. This bug affects all versions of dextrose
and other distros based on sugar 0.88.1.

The problem was caused by a too generalist logic
at _check_for_bundle in which the journal was trying
to install bundles also when copying files to
removable devices.

This bug seems to be fixed in mainstream, but as side
effect of a big change to the journal code.

This patch checks for corner cases and avoid any attempt of
installation when copying .xo files to removable devices.

Version 2: Add alsroot suggestions.

Signed-off-by: Martin Abente <martin.abente.lahaye at gmail.com>
 src/jarabe/journal/journalactivity.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index b96135c..916db7c 100644
--- a/src/jarabe/journal/journalactivity.py
+++ b/src/jarabe/journal/journalactivity.py
@@ -277,9 +277,15 @@ class JournalActivity(JournalWindow):
     def _check_for_bundle(self, object_id):
+        # XXX temporary hack, avoid bundle installation
+        # when copying .xo files to removable devices.
+        metadata = model.get(object_id)
+        if not model.is_editable(metadata):
+            return
         registry = bundleregistry.get_registry()
-        metadata = model.get(object_id)
         if metadata.get('progress', '').isdigit():
             if int(metadata['progress']) < 100:

More information about the Dextrose mailing list