summaryrefslogtreecommitdiffstats
path: root/lib/prserv/serv.py
AgeCommit message (Collapse)Author
2013-05-07prserv/cooker: Handle PRService errors cleanly1.16Richard Purdie
Current if the PR Service fails to start, bitbake carries on regardless or hangs with no error message. This adds an exception and then handles it correctly so the UIs correctly handle the error and exit cleanly. [YOCTO #4010] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-01prserv: Do not ping PRService if not requiredLianhao Lu
[YOCTO #1942] Ping the PRService only if PRSERV_HOST and PRSERV_PORT are set. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20prserv: fix import of sqlite3Martin Jansa
* this is used in all other bitbake parts where sqlite3 is used, don't know why it wasn't used here, but it fails e.g. on Gentoo Traceback (most recent call last): File "bin/bitbake", line 39, in <module> from bb import cooker File "lib/bb/cooker.py", line 39, in <module> import prserv.serv File "lib/prserv/serv.py", line 4, in <module> import xmlrpclib,sqlite3 ImportError: No module named sqlite3 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-11bitbake: Automatically start local PR service.Lianhao Lu
[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>
2012-01-11bitbake/PRservice: Added no_hist mode and export/import.Lianhao Lu
[YOCTO #1556] 1. Added the package_arch into the index to the DB table. Because the change in PACKAGE_ARCH will results in different checksum, and it is better to have seperate PR value domains for differnt PACKAGE_ARCH of the same pakcage. 2. Changed the PR service to operate in no history mode. In this mode, the for a given query tuple (version, pkgarch, checksum), the returned value will be the largest among all the values of the same (version, pkgarch). This means the PR value returned can NOT be decremented. 3. Added export function. For each (version, pkgarch) tuple, only the record with the maximum value will be exported. 4. Added import function. The record will only be imported if the imported value is larger than the value stored in the DB with the same (version, pkgarch, checksum) tuple. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-15make exception handling syntax consistentScott Garman
Update exception handling syntax to use the modern style: except ExcType as localvar Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27Add PR service deamon to bitbakeLianhao Lu
Added the initial implementation of the server side PR service. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>