Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#442 closed defect (fixed)

After installing activity there are two icons in list and favorites view

Reported by: erikos Owned by: erikos
Priority: Immediate Milestone:
Component: Sugar Version: Git as of bugdate
Severity: Blocker Keywords:
Cc: tomeu Distribution/OS: Unspecified
Bug Status: Resolved


I installed using Browse. There is only one activity in ~/Activities I know that Sascha reported the same issue on irc.

Attachments (1)

shell.log (38.3 KB) - added by erikos 15 years ago.
Logs from installing TypingTurtle

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by erikos

  • Owner changed from marcopg to erikos
  • Status changed from new to assigned

comment:2 Changed 15 years ago by erikos

  • Cc tomeu added

The add_bundle method in the bundleregistry get called twice - even though only one datastore entry is created. Actually the second time it gets called - it does so because our file monitor does report a change file_monitor_changed_cb

Changed 15 years ago by erikos

Logs from installing TypingTurtle

comment:4 Changed 15 years ago by erikos

  • Keywords r? added

This would do it.

diff --git a/src/jarabe/model/ b/src/jarabe/model/
index 6a05734..62ac6e2 100644
--- a/src/jarabe/model/
+++ b/src/jarabe/model/
@@ -72,7 +72,15 @@ class BundleRegistry(gobject.GObject):
         if not one_file.get_path().endswith('.activity'):
         if event_type == gio.FILE_MONITOR_EVENT_CREATED:
-            self.add_bundle(one_file.get_path())
+            try:
+                bundle = ActivityBundle(one_file.get_path())
+            except MalformedBundleException:
+                logging.error('Error loading bundle %r:\n%s' % (
+                        one_file.get_path(),
+                        ''.join(traceback.format_exception(*sys.exc_info()))))
+                return
+            if not self.is_installed(bundle):
+                self.add_bundle(one_file.get_path())
         elif event_type == gio.FILE_MONITOR_EVENT_DELETED:

comment:5 Changed 15 years ago by erikos

committed to get it in the snapshot:

I leave it open for tomeu to comment if he likes the fix.

comment:6 Changed 15 years ago by tomeu

Pushed a similar fix that doesn't need to access the disk:

comment:7 Changed 15 years ago by erikos

  • Keywords r? removed

comment:8 Changed 15 years ago by erikos

  • Bug Status changed from Assigned to Resolved
  • Resolution set to fixed
  • Status changed from assigned to closed

comment:9 Changed 11 years ago by godiard

  • Milestone 0.84 deleted

Milestone 0.84 deleted

Note: See TracTickets for help on using tickets.