summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/prserv/__init__.py
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2012-01-10 14:13:49 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-11 10:36:20 +0000
commit30a9bc6c92a8920d6e9c4a4b93b83bdbe5d48e78 (patch)
tree6cce4db7619f35e16cdab7961ef44adfdd859b9e /bitbake/lib/prserv/__init__.py
parent4a8a3c503fd896593b787c26edbe46a7324e494e (diff)
downloadpoky-30a9bc6c92a8920d6e9c4a4b93b83bdbe5d48e78.tar.gz
bitbake/PRservice: Added no_hist mode and export/import.
[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. (Bitbake rev: 379567ee879dcdc09a51f7f1212bde1076147a6f) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/prserv/__init__.py')
-rw-r--r--bitbake/lib/prserv/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/__init__.py b/bitbake/lib/prserv/__init__.py
index 2837e135d7..c27fffe37b 100644
--- a/bitbake/lib/prserv/__init__.py
+++ b/bitbake/lib/prserv/__init__.py
@@ -7,5 +7,8 @@ def init_logger(logfile, loglevel):
7 numeric_level = getattr(logging, loglevel.upper(), None) 7 numeric_level = getattr(logging, loglevel.upper(), None)
8 if not isinstance(numeric_level, int): 8 if not isinstance(numeric_level, int):
9 raise ValueError('Invalid log level: %s' % loglevel) 9 raise ValueError('Invalid log level: %s' % loglevel)
10 logging.basicConfig(level=numeric_level, filename=logfile) 10 FORMAT = '%(asctime)-15s %(message)s'
11 logging.basicConfig(level=numeric_level, filename=logfile, format=FORMAT)
11 12
13class NotFoundError(StandardError):
14 pass \ No newline at end of file