summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2012-01-10 06:13:50 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-11 10:36:20 (GMT)
commit489cde8eb0e19ef6fe8078148199eaf5b52631ae (patch)
treecb85947000c8efb778362c136f1f6a0c14ed31dc /bitbake/bin
parent30a9bc6c92a8920d6e9c4a4b93b83bdbe5d48e78 (diff)
downloadpoky-489cde8eb0e19ef6fe8078148199eaf5b52631ae.tar.gz
bitbake: Automatically start local PR service.
[YOCTO #1126] A local PR service will be started and stopped automatically along with the bitbake invocation/ternimation. This local PR service will be started only and if only when the PRSERV_HOST is set to 'localhost' and PRSERV_PORT is set to '0'. When started, the sqlite3 database is stored at "${PERSISTEN_DIR}/prserv.sqlite3" or "${CACHE}/prserv.sqlite3". (Bitbake rev: 9d8f45407c67ed0d3c4f820cf646de3c385067c7) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rw-r--r--bitbake/bin/bitbake-prserv9
1 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/bin/bitbake-prserv b/bitbake/bin/bitbake-prserv
index a7ab55f..a8d7acb 100644
--- a/bitbake/bin/bitbake-prserv
+++ b/bitbake/bin/bitbake-prserv
@@ -10,7 +10,7 @@ import prserv.serv
10 10
11__version__="1.0.0" 11__version__="1.0.0"
12 12
13PRHOST_DEFAULT='' 13PRHOST_DEFAULT='0.0.0.0'
14PRPORT_DEFAULT=8585 14PRPORT_DEFAULT=8585
15 15
16def main(): 16def main():
@@ -18,8 +18,8 @@ def main():
18 version="Bitbake PR Service Core version %s, %%prog version %s" % (prserv.__version__, __version__), 18 version="Bitbake PR Service Core version %s, %%prog version %s" % (prserv.__version__, __version__),
19 usage = "%prog < --start | --stop > [options]") 19 usage = "%prog < --start | --stop > [options]")
20 20
21 parser.add_option("-f", "--file", help="database filename(default: prserv.db)", action="store", 21 parser.add_option("-f", "--file", help="database filename(default: prserv.sqlite3)", action="store",
22 dest="dbfile", type="string", default="prserv.db") 22 dest="dbfile", type="string", default="prserv.sqlite3")
23 parser.add_option("-l", "--log", help="log filename(default: prserv.log)", action="store", 23 parser.add_option("-l", "--log", help="log filename(default: prserv.log)", action="store",
24 dest="logfile", type="string", default="prserv.log") 24 dest="logfile", type="string", default="prserv.log")
25 parser.add_option("--loglevel", help="logging level, i.e. CRITICAL, ERROR, WARNING, INFO, DEBUG", 25 parser.add_option("--loglevel", help="logging level, i.e. CRITICAL, ERROR, WARNING, INFO, DEBUG",
@@ -37,8 +37,7 @@ def main():
37 prserv.init_logger(os.path.abspath(options.logfile),options.loglevel) 37 prserv.init_logger(os.path.abspath(options.logfile),options.loglevel)
38 38
39 if options.start: 39 if options.start:
40 ret=prserv.serv.start_daemon(dbfile=options.dbfile, interface=(options.host, options.port), 40 ret=prserv.serv.start_daemon(options.dbfile, options.host, options.port,os.path.abspath(options.logfile))
41 logfile=os.path.abspath(options.logfile))
42 elif options.stop: 41 elif options.stop:
43 ret=prserv.serv.stop_daemon(options.host, options.port) 42 ret=prserv.serv.stop_daemon(options.host, options.port)
44 else: 43 else: