Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | python 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 | |
| 26 | addhandler primport_handler |
| 27 | primport_handler[eventmask] = "bb.event.ParseCompleted bb.event.ParseStarted" |