summaryrefslogtreecommitdiffstats
path: root/bin/bitbake-prserv
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2012-01-10 14:13:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-11 10:36:04 +0000
commit9d8f45407c67ed0d3c4f820cf646de3c385067c7 (patch)
tree2ff4abe078c5613e35ad372f9fa944ecb5237135 /bin/bitbake-prserv
parent379567ee879dcdc09a51f7f1212bde1076147a6f (diff)
downloadbitbake-contrib-9d8f45407c67ed0d3c4f820cf646de3c385067c7.tar.gz
bitbake-contrib-9d8f45407c67ed0d3c4f820cf646de3c385067c7.tar.bz2
bitbake-contrib-9d8f45407c67ed0d3c4f820cf646de3c385067c7.zip
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". Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin/bitbake-prserv')
-rwxr-xr-xbin/bitbake-prserv9
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/bitbake-prserv b/bin/bitbake-prserv
index a7ab55f736..a8d7acb4c2 100755
--- a/bin/bitbake-prserv
+++ b/bin/bitbake-prserv
@@ -10,7 +10,7 @@ import prserv.serv
__version__="1.0.0"
-PRHOST_DEFAULT=''
+PRHOST_DEFAULT='0.0.0.0'
PRPORT_DEFAULT=8585
def main():
@@ -18,8 +18,8 @@ def main():
version="Bitbake PR Service Core version %s, %%prog version %s" % (prserv.__version__, __version__),
usage = "%prog < --start | --stop > [options]")
- parser.add_option("-f", "--file", help="database filename(default: prserv.db)", action="store",
- dest="dbfile", type="string", default="prserv.db")
+ parser.add_option("-f", "--file", help="database filename(default: prserv.sqlite3)", action="store",
+ dest="dbfile", type="string", default="prserv.sqlite3")
parser.add_option("-l", "--log", help="log filename(default: prserv.log)", action="store",
dest="logfile", type="string", default="prserv.log")
parser.add_option("--loglevel", help="logging level, i.e. CRITICAL, ERROR, WARNING, INFO, DEBUG",
@@ -37,8 +37,7 @@ def main():
prserv.init_logger(os.path.abspath(options.logfile),options.loglevel)
if options.start:
- ret=prserv.serv.start_daemon(dbfile=options.dbfile, interface=(options.host, options.port),
- logfile=os.path.abspath(options.logfile))
+ ret=prserv.serv.start_daemon(options.dbfile, options.host, options.port,os.path.abspath(options.logfile))
elif options.stop:
ret=prserv.serv.stop_daemon(options.host, options.port)
else: