testing 8.2 using qemu

Gabriel Eirea geirea at gmail.com
Thu Sep 18 20:43:39 EDT 2008


I appreciate your response, everyone in OLPC is always trying to help
and that is comforting. Everything I write you should read it as
feedback from a not very proficient activity developer. I'm not
interested in whining nor blaming, just want to help pointing out
things that from my perspective could be improved so we can have a
stronger developer community.

> I have begun updating the [[Rainbow]] page to
> better reflect its audience (which is much wider than it was when the
> page was first created.)

Thank you, this is great.

> Try removing the '-' and see if you get further. (Note: you can find all
> the code for checking these sorts of nits in the rainbow source code
> here: (look for functions named check_*)
>  http://dev.laptop.org/git?p=security;a=blob;f=rainbow/rainbow/inject.py;hb=HEAD
> P.S. To read log files that have funny characters in them, run
>  cat /path/to/log
> from a terminal.

It looks like I've been completely off the mark. I dissmissed the log
file because of all the strange characters. I will test the bundle
without the hyphen as soon as I can get 8.2 running on the emulator.
Thank you!

> $SUGAR_ACTIVITY_ROOT means 'the value of the environment variable named
> "SUGAR_ACTIVITY_ROOT"'. The concatenated '/data' part means "append the
> string '/data' to the previous string." In python, you could perform
> this operation as follows:
>  import os
>  print os.path.join(os.environ['SUGAR_ACTIVITY_ROOT'], 'data')
> I believe that sugar's 'env' module provides some helper functions for
> accomplishing this task.
> -- Can you suggest a good place to record this tidbit where you might
> have found it?

I appreciate your explanation but my question was not about the
literal meaning but about where in the filesystem does the variable
point to. My thinking was: I need to read a configuration file that I
myself generate and ship in the bundle, but then rainbow doesn't let
me read it because it's in $HOME, so where should I put that file and
how do I put it there? Now the question seems pointless because if
understood correctly $SUGAR_ACTIVITY_ROOT is mostly used for writing
files. Then, I'm guessing the case scenario is this: if you have
read-only files then it is ok to leave them in $HOME; if you have
read-write files then you should write them to
$SUGAR_ACTIVITY_ROOT/data. My question now is: if you have a
configuration file with some preset values that goes in the bundle and
the user changes it, the application should be able to read it from
$HOME the first time, copy the original file from $HOME to
$SUGAR_ACTIVITY_ROOT/data and then use that copy in the future ?

>> 1) there was a change in Sugar (apparently the introduction of
>> rainbow) that broke an otherwise working activity,
> Our timeframes may differ; did you start developing your activity before
> http://lists.laptop.org/pipermail/sugar/2007-November/003725.html ?

No, I started much later, probably around June'08. I wish that email
message was available in the wiki because it explains the issue
better. Also, I followed the pygame->olpcgames route to sugarize the
activity, it would be nice to have the issue clarified in the
olpcgames page too.

>> 3) there was no clear information on how to fix it, and
> a) Did you have difficulty locating your activity's log file?
> b) Did you have trouble reading the log?

I couldn't test it on 8.2 because of the issues with qemu. The log was
in the trac ticket but I wasn't able to read it because of all the
strange characters.

> c) Did you encounter other information which led you astray?

The only information on rainbow I could find was in the low-level API
link and it explained something about the directories, so i thought
that should be it. (How could I realize it was the hyphen in the
bundle name?)

>> 4) the qemu images were not working
> OLPC cannot do everything -- have you considered finding some way to
> keep the QEMU images in good working order?

I wouldn't know how to start with the image thing. I can't even figure
out which build number I have in my Ubuntu setup :) I understand OLPC
can't do everything and I'm trying to contribute something according
to my capabilities, but I would say that OLPC should think strongly
about giving the developers community the tools that are needed to
create and test activities. Maybe there are other ways of doing it
(what does everyone use?), but for me it is the ubuntu packages and

>> I'm concerned that this doesn't help create a strong developer
>> community.
> Explain more please.

I believe that lowering the barriers to entry should be a priority for
OLPC. This means, among other things:
- well-documented API
- stable API or at least communicating changes efficiently
- tutorials and examples
- developer and test environments
I know efforts are made in all these areas, but I believe more is
needed. I'm making the effort to recruit developers thru Ceibal Jam,
it would help a lot if I can point them to a good set of resources to
get them started, not to mention that it would help me a lot too.

>> It takes too much time and effort to find out how to do
>> simple things.
> Such as?

Sugarizing the activity was relatively easy using olpcgames but I
didn't like the black-box approach. However, I couldn't find how to do
it differently, I spent a lot of time reading the wiki, and looking at
other activities' code. I would have liked to see something like the
gtk Hello World activity but with pygame.

I made another activity to read a file from the pendrive and copy it
to the clipboard. I couldn't find information on how to do it, I ended
up copying and pasting code from the Journal activity. It works, but I
still don't know how. Further, I still don't know how to do the
reverse (copy from the clipboard to the pendrive).

A good set of examples about common tasks like these would be very valuable.

Best regards,


More information about the Devel mailing list