[Sugar-devel] activity instance directory
quozl at laptop.org
Tue Jan 19 21:50:31 EST 2016
The API documentation was wrong, and has been edited.
Rainbow did delete instance and tmp. Sugar did not.
Rainbow has not been in OLPC OS for some time. (/etc/olpc-security
must exist, /usr/bin/rainbow-run must be executable).
Rainbow is not in other builds that use Sugar.
Sugar activities that were coded for Rainbow, and against this
documentation, will leave an instance and tmp directory on the
system. Every activity.
Sugar must delete both directories.
The next question is when?
0. on reinstall of OLPC OS, or reboot of SoaS,
This is what we do at the moment.
1. on Sugar start,
cleanup_temporary_files in sugar:src/jarabe/main.py might be extended,
so that Sugar starts up and deletes the directories.
Disadvantage is a small delay during Sugar start, the need to iterate
over the bundle ids, and which list of bundles to use.
2. on activity start,
The activity factory module function get_environment() in
might be extended to delete first, before making the directories.
Disadvantage is a small delay during activity start.
3. on activity close
In the Activity class method _complete_close() in
src/sugar3/activity/activity.py we might delete the directories as the
activity is closing.
Disadvantage is that an activity that crashes won't delete the
Advantage is that any waste will be cleaned as soon as possible.
4. on activity close in shell
Disadvantage is that Sugar may be momentarily unresponsive when an
activity closes or crashes.
Can we work toward a consensus?
My preference is on activity start, since that is the last time it
must be done to be consistent with the design intent. Are you
registered on github?
On Tue, Jan 19, 2016 at 01:47:23AM +0200, Tony Anderson wrote:
> At a workshop I am giving in Rwanda, an XO got 'Journal Full'. It
> turns out that the Browse instance folder was using 1.2GB of store.
> The low-level API says:
> This directory is used similar to a /var/tmp directory, being
> backed by flash rather than by RAM. It is unique per instance. It is
> used for transfer to and from the datastore (see keeping and
> resuming). This directory is deleted when the activity exits
> (specifically, as soon as all children of the activity's first
> process die)
> However, apparently in 0.106 this directory is not being deleted.
More information about the Sugar-devel