diff options
| author | Lianhao Lu <lianhao.lu@intel.com> | 2012-01-10 14:13:50 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-11 10:36:20 +0000 |
| commit | 489cde8eb0e19ef6fe8078148199eaf5b52631ae (patch) | |
| tree | cb85947000c8efb778362c136f1f6a0c14ed31dc /bitbake/lib/bb/cooker.py | |
| parent | 30a9bc6c92a8920d6e9c4a4b93b83bdbe5d48e78 (diff) | |
| download | poky-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/lib/bb/cooker.py')
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
| 36 | from collections import defaultdict | 36 | from collections import defaultdict |
| 37 | import bb, bb.exceptions, bb.command | 37 | import bb, bb.exceptions, bb.command |
| 38 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue | 38 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue |
| 39 | import prserv.serv | ||
| 39 | 40 | ||
| 40 | logger = logging.getLogger("BitBake") | 41 | logger = logging.getLogger("BitBake") |
| 41 | collectlog = logging.getLogger("BitBake.Collection") | 42 | collectlog = logging.getLogger("BitBake.Collection") |
| @@ -1311,9 +1312,11 @@ class BBCooker: | |||
| 1311 | # Empty the environment. The environment will be populated as | 1312 | # Empty the environment. The environment will be populated as |
| 1312 | # necessary from the data store. | 1313 | # necessary from the data store. |
| 1313 | #bb.utils.empty_environment() | 1314 | #bb.utils.empty_environment() |
| 1315 | prserv.serv.auto_start(self.configuration.data) | ||
| 1314 | return | 1316 | return |
| 1315 | 1317 | ||
| 1316 | def post_serve(self): | 1318 | def post_serve(self): |
| 1319 | prserv.serv.auto_shutdown(self.configuration.data) | ||
| 1317 | bb.event.fire(CookerExit(), self.configuration.event_data) | 1320 | bb.event.fire(CookerExit(), self.configuration.event_data) |
| 1318 | 1321 | ||
| 1319 | def shutdown(self): | 1322 | def shutdown(self): |
