Tony, Please test this pull request; https://github.com/sugarlabs/sugar-toolkit-gtk3/pull/306
"Remove Rainbow, clear activity instance/ and tmp/ Sugar depended on Rainbow for clearing the activity instance/ and tmp/ directories. But Rainbow is no longer used downstream. - remove support for Rainbow, - clear the contents of instance/ and tmp/ on start and stop, - avoid race when creating directories; don't check they exist before we create. https://bugs.sugarlabs.org/ticket/4931 On Wed, Jan 20, 2016 at 01:50:31PM +1100, James Cameron wrote: > The API documentation was wrong, and has been edited. > > https://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API > > 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 > sugar-toolkit-gtk3:src/sugar3/activity/activityfactory.py > 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 > directories. > > 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: > > > > $SUGAR_ACTIVITY_ROOT/instance/ > > 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. > > > > Tony > > -- > James Cameron > http://quozl.netrek.org/ -- James Cameron http://quozl.netrek.org/ _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel