Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete activity bundle after download and install #81

Open
quozl opened this issue May 7, 2018 · 5 comments
Open

Delete activity bundle after download and install #81

quozl opened this issue May 7, 2018 · 5 comments

Comments

@quozl
Copy link
Contributor

quozl commented May 7, 2018

Reproducer:

  • download an activity bundle from activities.sugarlabs.org or wiki.laptop.org,

Observed result:

  • activity bundle is both installed and left in journal

Expected result:

  • activity bundle is installed and not left in journal.
@Hrishi1999
Copy link

Sorry if I am wrong, but shouldn't this be a journal feature?
At https://github.com/sugarlabs/sugar/blob/489974f4243eb3a18c0bea07812c436ed8aa7d5c/src/jarabe/view/customizebundle.py , generate_bundle is what installs the activity right? So it should be implemented there?

@quozl
Copy link
Contributor Author

quozl commented Jan 24, 2019

Good question. I've other questions to suggest; How did Browse trigger it? Why does Browse not receive an answer? Why does Browse not delete the journal object afterwards?

@Hrishi1999
Copy link

@quozl
Copy link
Contributor Author

quozl commented Jan 26, 2019

Don't think so, that just writes the bundle to the journal. Wouldn't it be the callback to the prompt? See https://github.com/sugarlabs/browse-activity/blob/master/downloadmanager.py#L301 and try commenting that line out, you may find it won't install the bundle? You can find launch_bundle in the Sugar Toolkit. It does return something, but I'm not sure how to be sure when it is finished installing.

@quozl
Copy link
Contributor Author

quozl commented Aug 27, 2019

@nswarup14 said;

  • When an activity is being downloaded from activities.sugarlabs.org, the journal object is created by the self.create_journal_object method. As the download progresses, the journal entry is update by _update_progress handler.
  • Once the download is finished, the __download_finished_cb handler, updates the metadata for the journal entry created earlier, and writes it to the journal once again. This entry is the .xo activity bundle.
  • I'm not quite sure which line installs the activity, but it isn't just launch_bundle. I believe get_bundle also installs the activity. The reasoning is that get_bundle always returns None for me. I checked the shell.log after each download, the log file say that No bundle in activity.info. Yet the activity is installed and I can see it in the favourite view.
  • If the activity bundle is to be removed, the option of Show in Journal is no longer required. Show in Journal only works if the journal contains the entry, but if we are removing it after activity install, then the option has no meaning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants