1# 2# Copyright OpenEmbedded Contributors 3# 4# SPDX-License-Identifier: MIT 5# 6 7python primport_handler () { 8 import bb.event 9 if not e.data: 10 return 11 12 if isinstance(e, bb.event.ParseCompleted): 13 import oe.prservice 14 #import all exported AUTOPR values 15 imported = oe.prservice.prserv_import_db(e.data) 16 if imported is None: 17 bb.fatal("import failed!") 18 19 for (version, pkgarch, checksum, value) in imported: 20 bb.note("imported (%s,%s,%s,%d)" % (version, pkgarch, checksum, value)) 21 elif isinstance(e, bb.event.ParseStarted): 22 import oe.prservice 23 oe.prservice.prserv_check_avail(e.data) 24} 25 26addhandler primport_handler 27primport_handler[eventmask] = "bb.event.ParseCompleted bb.event.ParseStarted" 28