From 489cde8eb0e19ef6fe8078148199eaf5b52631ae Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 10 Jan 2012 14:13:50 +0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bitbake/lib/bb/cooker.py') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 203271868a..194046ea91 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -36,6 +36,7 @@ from functools import wraps from collections import defaultdict import bb, bb.exceptions, bb.command from bb import utils, data, parse, event, cache, providers, taskdata, runqueue +import prserv.serv logger = logging.getLogger("BitBake") collectlog = logging.getLogger("BitBake.Collection") @@ -1311,9 +1312,11 @@ class BBCooker: # Empty the environment. The environment will be populated as # necessary from the data store. #bb.utils.empty_environment() + prserv.serv.auto_start(self.configuration.data) return def post_serve(self): + prserv.serv.auto_shutdown(self.configuration.data) bb.event.fire(CookerExit(), self.configuration.event_data) def shutdown(self): -- cgit v1.2.3-54-g00ecf