blob: 8ed45f03f004dfc38d0e42a4092e9a8b2d479b34 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001python primport_handler () {
2 import bb.event
3 if not e.data:
4 return
5
6 if isinstance(e, bb.event.ParseCompleted):
7 import oe.prservice
8 #import all exported AUTOPR values
9 imported = oe.prservice.prserv_import_db(e.data)
10 if imported is None:
11 bb.fatal("import failed!")
12
13 for (version, pkgarch, checksum, value) in imported:
14 bb.note("imported (%s,%s,%s,%d)" % (version, pkgarch, checksum, value))
15 elif isinstance(e, bb.event.ParseStarted):
16 import oe.prservice
17 oe.prservice.prserv_check_avail(e.data)
18}
19
20addhandler primport_handler
21primport_handler[eventmask] = "bb.event.ParseCompleted bb.event.ParseStarted"