Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch
diff options
context:
space:
mode:
Diffstat (limited to 'rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch')
-rw-r--r--rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch b/rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch
new file mode 100644
index 0000000..3bd7e34
--- /dev/null
+++ b/rpms/sugar/sugar-Copy-.xo-to-removable-device-hack.patch
@@ -0,0 +1,56 @@
+From patchwork Wed Mar 16 12:55:53 2011
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [sugar] Copy .xo to removable device hack
+Date: Wed, 16 Mar 2011 17:55:53 -0000
+From: Martin Abente <martin.abente.lahaye@gmail.com>
+X-Patchwork-Id: 721
+Message-Id: <1300280153-7190-1-git-send-email-martin.abente.lahaye@gmail.com>
+To: dextrose@lists.sugarlabs.org, anish@sugarlabs.org, alsroot@sugarlabs.org
+
+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@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):
+ self._list_view.update_dates()
+
+ 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:
+ return