[Buildbot-commits] buildbot/buildbot/slave bot.py,1.12,1.13

Brian Warner warner at users.sourceforge.net
Fri May 6 04:58:00 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/slave
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24357/buildbot/slave

Modified Files:
	bot.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-139
Creator:  Brian Warner <warner at monolith.lothar.com>

Merged from warner at monolith.lothar.com--2005 (patch 4-5)

Stop using mktap, create buildbot.tac instead.

Patches applied:

 * warner at monolith.lothar.com--2005/buildbot--dev--0--patch-4
   stop using mktap, create buildbot.tac instead

 * warner at monolith.lothar.com--2005/buildbot--dev--0--patch-5
   remove more old mktap-related code


Index: bot.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/bot.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- bot.py	25 Apr 2005 19:06:23 -0000	1.12
+++ bot.py	6 May 2005 04:57:58 -0000	1.13
@@ -447,76 +447,3 @@
         service.MultiService.stopService(self)
         # now kill the TCP connection
         self.connection._connection.disconnect()
-
-class Options(usage.Options):
-    synopsis = "Usage: mktap buildbot slave --name <name> --passwd <passwd> [options]"
-    
-    longdesc = """
-    This command creates a buildslave .tap file. The bot will use the <name>
-    and <passwd> arguments to authenticate itself when connecting to the
-    master. All commands are run in a build-specific subdirectory of
-    <basedir>, which defaults to the working directory that mktap was run
-    from. <master> is a string of the form 'hostname:port', and specifies
-    where the buildmaster can be reached.
-
-    <name>, <passwd>, and <master> will be provided by the buildmaster
-    administrator for your bot.
-    """
-    
-    optParameters = [
-        ["name", "n", None, "Name for this build slave"],
-        ["passwd", "p", None, "Password for this build slave"],
-        ["basedir", "d", ".", "Base directory to use"],
-        ["master", "m", "localhost:8007",
-         "Location of the buildmaster (host:port)"],
-        ["keepalive", "k", 0,
-         "Interval at which keepalives should be sent (in seconds)"],
-        ["usepty", None, 1, "child processes should be run in a pty"],
-        ]
-
-    def abort(self):
-        print self.__str__()
-        sys.exit(2)
-        
-    def postOptions(self):
-        problems = 0
-        if self['name'] == None:
-            print " Must specify buildslave name with '--name myslave'"
-            problems = 1
-        if self['passwd'] == None:
-            print " Must specify slave password with '--passwd myslave'"
-            problems = 1
-        self['usepty'] = int(self['usepty'])
-        self['keepalive'] = int(self['keepalive'])
-        if problems:
-            print
-            self.abort()
-        
-    
-def makeService(config):
-    basedir = config['basedir']
-    master = config['master']
-
-    if not os.path.isdir(basedir):
-        raise "bot homedir '%s' is not a directory" % basedir
-    basedir = os.path.abspath(basedir)
-    print " Using '%s' for slave base directory" % basedir
-    try:
-        host, port = re.search(r'(.+):(\d+)', master).groups()
-        port = int(port)
-    except:
-        print "unparseable master location '%s'" % master
-        print " expecting something more like localhost:8007"
-        raise
-    print " Will connect to buildmaster on host '%s' at port '%d'" % (host,
-                                                                      port)
-    if config['usepty']:
-        print " Will run child processes in PTYs"
-    else:
-        print " Will NOT run child processes in PTYs"
-
-    s = BuildSlave(host, port,
-                   config['name'], config['passwd'], basedir,
-                   config['keepalive'], config['usepty'])
-    s.setName("buildslave")
-    return s





More information about the Commits mailing list