[Buildbot-devel] buildbot and p4

Carlos Manuel Duclos Vergara carlos at embedded.cl
Thu Sep 27 06:21:06 UTC 2007


Hi all,

I'm testing buildbot and I need to use p4 as a source. I don't want to
build every time a new change goes to my repository, I just want periodic
builds. My perforce configuration is as follows:

from buildbot.steps.source import P4

source = P4(p4base='//depot/app/', defaultBranch='main',
p4port='p4-server:866')

f = factory.BuildFactory([source])

c['builders'] = [
{'name':'app_main',
'slavename':'slave01',
'builddir':'app_main',
'factory':f },
]

And every time I try to start buildbot I get this error:

cduclos at tolgalen:~$ sudo buildbot start /var/lib/buildbot/buildmaster/
Following twistd.log until startup finished..
2007/09/27 08:18 +0200 [-] Log opened.
2007/09/27 08:18 +0200 [-] twistd 2.5.0 (/usr/bin/python 2.5.1) starting up
2007/09/27 08:18 +0200 [-] reactor class: <class
'twisted.internet.selectreactor.SelectReactor'>
2007/09/27 08:18 +0200 [-] Loading buildbot.tac...
2007/09/27 08:18 +0200 [-] Loaded.
2007/09/27 08:18 +0200 [-] loading configuration from
/var/lib/buildbot/buildmaster/master.cfg
2007/09/27 08:18 +0200 [-] error while parsing config file
2007/09/27 08:18 +0200 [-] error during loadConfig
2007/09/27 08:18 +0200 [-] Unhandled Error
        Traceback (most recent call last):
          File
"/usr/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py",
line 183, in startApplication
            app.startApplication(application, not config['no_save'])
          File
"/usr/lib/python2.5/site-packages/twisted/application/app.py",
line 400, in startApplication
            service.IService(application).startService()
          File
"/usr/lib/python2.5/site-packages/twisted/application/service.py",
line 233, in startService
            service.startService()
          File "/usr/lib/python2.5/site-packages/buildbot/master.py", line
569, in startService
            self.loadTheConfigFile()
        --- <exception caught here> ---
          File "/usr/lib/python2.5/site-packages/buildbot/master.py", line
624, in loadTheConfigFile
            self.loadConfig(f)
          File "/usr/lib/python2.5/site-packages/buildbot/master.py", line
642, in loadConfig
            exec f in localDict
          File "/var/lib/buildbot/buildmaster/master.cfg", line 61, in
<module>
            source = P4(p4base='//depot/app/', defaultBranch='main',
p4port='p4-server:866')
          File
"/usr/lib/python2.5/site-packages/buildbot/steps/source.py",
line 834, in __init__
            Source.__init__(self, **kwargs)
        exceptions.TypeError: __init__() takes at least 2 arguments (1 given)

2007/09/27 08:18 +0200 [-] The new config file is unusable, so I'll ignore
it.
2007/09/27 08:18 +0200 [-] I will keep using the previous config file
instead.

The buildmaster appears to have encountered an error in the master.cfg config
file during startup. It is probably running with an empty configuration right
now. Please inspect and fix master.cfg, then restart the buildmaster.



Can anybody point me to what I'm doing wrong? (btw, I'm not an expert on
python!)

-- 
Carlos Manuel Duclos Vergara
http://carlosduclos.blogspot.com




More information about the devel mailing list