Ticket #1786 (accepted defect)

Opened 3 years ago

Last modified 3 years ago

oversight in sugar.activity.activityfactory.ActivityCreationHandler._find_object_reply_handler()

Reported by: sascha_silbe Owned by: sascha_silbe
Priority: Normal Milestone: 0.90
Component: sugar-toolkit Version: Git as of bugdate
Severity: Unspecified Keywords: r?
Cc: Distribution/OS: Unspecified
Bug Status: New

Description

Happened to me during testing the version support prototype; I am too lazy to reproduce it on the master branch right now but it should be obvious enough anyway.
sugar.activity.activityfactory.ActivityCreationHandler}} has been changed to use {{{sugar.datastore.datastore instead of interfacing with directly via D-Bus. A part of _find_object_reply_handler() was missed during the conversion:

    def _find_object_reply_handler(self, jobjects, count):
        if count > 0:
            if count > 1:
                logging.debug("Multiple objects has the same activity_id.")
            self._handle.object_id = jobjects[0]['uid']
        self._launch_activity()

jobjects is a list os DSObjects now, so we need to to use jobjects[0].metadata['uid'].

I guess the proper fix would be to pass data store object ids (uid resp. (tree_id, version_id)) instead of activity_ids.

Attachments

1786.patch Download (1.0 KB) - added by sascha_silbe 3 years ago.
fix oversight from direct D-Bus interfacing -> sugar.datastore.datastore conversion

Change History

Changed 3 years ago by sascha_silbe

  • keywords r? added
  • owner changed from erikos to sascha_silbe
  • status changed from new to accepted
  • summary changed from cannot launch activity if multiple data store entries have the same activity_id to oversight in sugar.activity.activityfactory.ActivityCreationHandler._find_object_reply_handler()

I'm currently unable to figure out how to cause _find_object_reply_handler() to be called at all (and unlike I originally thought it doesn't just happen for duplicate {{{activity_id}}s), but the fix is straightforward.

Changed 3 years ago by sascha_silbe

fix oversight from direct D-Bus interfacing -> sugar.datastore.datastore conversion

Changed 3 years ago by erikos

  • priority changed from Unspecified by Maintainer to Immediate

Changed 3 years ago by sascha_silbe

Actually this only applies once #1609 is fixed.

Changed 3 years ago by erikos

  • priority changed from Immediate to Normal
  • milestone changed from 0.88 to 0.90

Ok, moving that out to 0.90, as it is not a regression and discuss #1609.

Note: See TracTickets for help on using tickets.