Ticket #2715 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

.xo install from journal

Reported by: dcbw Owned by: tomeu
Priority: blocker Milestone: Update.1
Component: journal-activity Version:
Keywords: Cc: Eben, marco, tomeu
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

When a .xo file is present on external storage, like USB or SD card, the files show up in a flat list. When the .xo file is dragged from that device's list to the journal icon in the journal, it should be copied onto the NAND and installed in ~/Activities, and added to the activity bar in the frame.

Attachments

2715-mime.diff (1.5 kB) - added by danw 7 years ago.
patch to add an application/vnd.olpc-x-sugar mime mapping
2715-datastore.diff (1.1 kB) - added by danw 7 years ago.
datastore patch
2715-journal.diff (1.8 kB) - added by danw 7 years ago.
updated diff to journal

Change History

  Changed 7 years ago by dcbw

  • cc Eben added
  • priority changed from normal to blocker

  Changed 7 years ago by Eben

See my comment on #2716 regarding automatically placing the icon in the Frame.

Changed 7 years ago by danw

patch to add an application/vnd.olpc-x-sugar mime mapping

  Changed 7 years ago by danw

  • cc marco added
  • keywords review? added

Marco, can you review the patch I just added for sugar? We're not currently registering the ".xo" extension anywhere, so the journal identifies bundles as being just zip files.

This will also need an rpm spec file change to call update-mime-database

  Changed 7 years ago by marco

  • keywords review+ added; review? removed

Changed 7 years ago by danw

datastore patch

  Changed 7 years ago by danw

  • cc bcsaller added

bcsaller: see above patch (https://dev.laptop.org/attachment/ticket/2715/2715-datastore.diff)

Without this, copying files off USB drives doesn't work, because the filename doesn't include the path to the mountpoint.

  Changed 7 years ago by marco

  • keywords review+ removed
  • owner changed from danw to bcsaller
  • component changed from journal-activity to datastore

  Changed 7 years ago by danw

  • cc tomeu added; bcsaller removed
  • keywords review? added
  • component changed from datastore to journal-activity
  • owner changed from bcsaller to danw

Not sure why I needed it before, but the datastore patch doesn't seem to be needed now.

Attaching a new patch to the journal, that just makes it watch for bundles being added to the journal from any source, and then installs them. (So it fixes #2716 as well.)

  Changed 7 years ago by tomeu

  • keywords review- added; review? removed
+        jobject_activity = jobject.metadata['activity']
+        if jobject_activity is not None:
+            if get_activity_registry().get_activity(jobject_activity):
+                # already installed
+                return
...
+        if jobject_activity is None:
+            jobject.metadata['activity'] = bundle.get_service_name()
+            datastore.write(jobject,
+                            reply_handler=self._jobject_bundle_update_cb,
+                            error_handler=self._jobject_bundle_update_error_cb)

Why don't we just check that the service name inside the bundle is not already in the activity registry?

In this way, we would save one write to the datastore and wouldn't need to pollute the 'activity' property, that is used for a different purpose.

Changed 7 years ago by danw

updated diff to journal

  Changed 7 years ago by danw

  • keywords review? added; review- removed

OK, updated to not use the "activity" property.

  Changed 7 years ago by tomeu

  • keywords review+ added; review? removed

looks good to me

  Changed 7 years ago by danw

  • status changed from new to closed
  • resolution set to fixed

committed

follow-ups: ↓ 13 ↓ 14   Changed 6 years ago by bemasc

  • status changed from closed to reopened
  • resolution deleted
  • milestone deleted

As of joyride-190, USB loading of .xo packages no longer works for me. The Journal recognizes them, and even extracts their icons, but neither "resume" nor dragging to the Journal allows me to launch them.

in reply to: ↑ 12 ; follow-up: ↓ 15   Changed 6 years ago by AlbertCahalan

Replying to bemasc:

As of joyride-190, USB loading of .xo packages no longer works for me. The Journal recognizes them, and even extracts their icons, but neither "resume" nor dragging to the Journal allows me to launch them.

It's worse than that. Installation from Browse is also supposed to go through Journal. This does not seem to work. Even if it did, the current plan would be rather confusing. Installation should move the package from Journal to the task bar; uninstallation should move it back.

in reply to: ↑ 12   Changed 6 years ago by tomeu

  • keywords review+ removed
  • owner changed from danw to tomeu
  • status changed from reopened to new
  • milestone set to Never Assigned

Replying to bemasc:

As of joyride-190, USB loading of .xo packages no longer works for me. The Journal recognizes them, and even extracts their icons, but neither "resume" nor dragging to the Journal allows me to launch them.

Thanks for reporting this, but I would prefer if tickets were not reopened if the cause of the issue is not clear to be the same.

Can you please attach the journal log? Also, this could be due to a malformed bundle, can you attach the .xo?

Perhaps you would want to consider upgrading to a more recent joyride, as things have been changing fast in the last days.

in reply to: ↑ 13 ; follow-up: ↓ 16   Changed 6 years ago by tomeu

Replying to AlbertCahalan:

Replying to bemasc:

As of joyride-190, USB loading of .xo packages no longer works for me. The Journal recognizes them, and even extracts their icons, but neither "resume" nor dragging to the Journal allows me to launch them.

It's worse than that. Installation from Browse is also supposed to go through Journal. This does not seem to work. Even if it did, the current plan would be rather confusing. Installation should move the package from Journal to the task bar; uninstallation should move it back.

Albert, I don't really get what's worse. Could you please explain? Thanks!

in reply to: ↑ 15   Changed 6 years ago by AlbertCahalan

It's worse than that. Installation from Browse is also supposed to go through Journal.

...

Albert, I don't really get what's worse. Could you please explain? Thanks!

Not just USB is affected. One could argue that installing from USB will be a rare case out in the wild, and thus not too important. Installing from the browser is probably the norm. The fact that this too is broken makes the situation much worse.

  Changed 6 years ago by jg

  • milestone changed from Never Assigned to Update.1

  Changed 6 years ago by tomeu

Trying with http://wiki.laptop.org/go/Implode worked ok in latest joyride. Can you please attach logs and the activity bundle? Thanks!

  Changed 6 years ago by marco

  • status changed from new to closed
  • resolution set to fixed

Worked for me too in 232. This is now covered by #4642 anyway, if you can provide logs please attach them there.

Note: See TracTickets for help on using tickets.