Activity co-op: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes.
The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes.


The current incarnation of this idea is "Brian's Script", which is a structured list of activity repositories on dev.laptop.org.
= STEPS FOR SUCCESS: 1 =

This assumes a clean install with no activities.

= Brian's Script: STEPS FOR SUCCESS: 1 =
sudo yum install git
cd ~
cd ~
vi gitlist
vi gitlist
Line 62: Line 67:
Type :wq to write and quit.
Type :wq to write and quit.


= STEPS FOR SUCESS: 2 =
= Brian's Script: STEPS FOR SUCESS: 2 =
vi briansscript.py
vi briansscript.py


Line 103: Line 108:
python briansscript.py
python briansscript.py


Cross your fingers. Yell at Brian. Fix it. Commit it.
Keep your fingers crossed. Yell at Brian. Fix it.

Revision as of 03:14, 18 July 2008

Developers -- When you use an activity and there's something you don't like... what do you do?

  1. Ignore it
  2. Tell the activity's dev about it
  3. File a proper bug report for it
  4. Fix it locally
  5. Make a patch for it
  6. git push

The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes.

The current incarnation of this idea is "Brian's Script", which is a structured list of activity repositories on dev.laptop.org.

This assumes a clean install with no activities.

Brian's Script: STEPS FOR SUCCESS: 1

sudo yum install git
cd ~
vi gitlist

Press i to begin input mode... input:

git clone git://dev.laptop.org/projects/terminal-activity
terminal-activity
git clone git://dev.laptop.org/activities/x2o
x2o
#git clone git://dev.laptop.org/users/dsd/tamtam
#tamtam
git clone git://dev.laptop.org/activities/xomail
xomail
git clone git://dev.laptop.org/activities/model
model/activity
git clone git://dev.laptop.org/activities/physics
physics
git clone git://dev.laptop.org/journal-activity
journal-activity
git clone git://dev.laptop.org/activities/develop
develop/develop-activity
#git clone git://dev.laptop.org/projects/etoys
#?  no idea.
git clone git://dev.laptop.org/projects/connect-activity
connect-activity
git clone git://dev.laptop.org/projects/read-activity
read-activity
#git clone git://dev.laptop.org/projects/listen-spell
#?
git clone git://dev.laptop.org/users/dsd/record
record
git clone git://dev.laptop.org/users/cscott/firefox-activity
firefox-activity
git clone git://dev.laptop.org/mamamedia/story-builder
story-builder
git clone git://dev.laptop.org/web-activity
web-activity
git clone git://dev.laptop.org/chat-activity
chat-activity
git clone git://dev.laptop.org/projects/calculate
calculate
git clone git://dev.laptop.org/projects/pippy-activity
pippy-activity
git clone git://dev.laptop.org/projects/write
write

Press esc to exit input mode. Press "gg" to see top of file. Confirm there is no leading newline, as this would destroy all.

Type :wq to write and quit.

Brian's Script: STEPS FOR SUCESS: 2

vi briansscript.py

again, insert into this file:

#!/usr/local/bin/python
import os

siminput = open("gitlist")
infoline = siminput.readlines()
i = 0
git = []
activity = []
for record in infoline:
    if not i % 2 and not record.startswith("#"):
         git.append(record.strip("\n")) # git command
    if i % 2 and not record.startswith("#"):
         activity.append(record.strip("\n")) # activity folder path
    i += 1
print activity

for g in git:
    os.system(g)

for v in activity:
    print v
    activityinfo = open(v + "/activity/activity.info")
    infoline = activityinfo.readlines()
    for line in infoline:
        if line.startswith("name"):
            print line[7:].strip("\n") + "test"   
            os.system("ln -s ../" + v + " Activities/" + line[7:].strip("\n") + ".activity")

STEPS FOR SUCCESS: 3

mkdir Activities

Cross your fingers. This will take but two minutes.

python briansscript.py

Keep your fingers crossed. Yell at Brian. Fix it.