[sugar] clarification of SUGAR_ACTIVITY_ROOT
Wed Feb 27 11:17:26 EST 2008
On Feb 27, 2008, at 4:20 , Paul Fox wrote:
> hi --
> newbie activity developer here. i'm trying to get an existing app
> working as an activity, and i'm trying to keep it "well behaved"
> i don't quite understand the SUGAR_ACTIVITY_ROOT variable.
> the wiki says that it's "Writable space for the activity....
> Activities are prohibited from writing anywhere else in the file
> system.", and at http://wiki.laptop.org/go/Low-
> it refers to three "virtual" subdirectories, and describes the "data",
> "instance", and "tmp" directories.
> when i track down its value while my activity runs, it leads to
> three very un-virtual subdirectories somewhere beneath
That's only if you run in jhbuild. On the XO under rainbow these
directories are elsewhere.
> - what's the "virtual" part mean? can the directories referred
> to by SUGAR_ACTIVITY_ROOT move around?
Well they are real directories from the activity's pov but e.g. "tmp"
will go away when you close the activity, and "data" is bind-mounted
(I think) into the current activity instance's home directory. Other
implementations are possible so the activity should not make
assumptions about the actual location. Maybe we should remove the
"virtual" from the description?
> - what if my activity might have larger data needs than
> can be accomodated on the root fs? what if i'd like to
> use space on a removeable device? is there a way to
> manage this? the activity is a street mapping program,
> with the ability to download map data. map data always
> takes tens, if not hundreds, of megabytes. (i.e. all of
> texas takes 300M, all of rhode island takes 8M.)
This is not possible in the current datastore design AFAIK. Removable
devices are supported as "mount-points" in the datastore but cannot
currently be used to create files there without an intermediate copy
in the root fs.
The datastore redesign is supposed to address this problem, e.g. to
allow the Record activity to directly record movies onto a USB drive.
- Bert -
More information about the Sugar-devel