blob: 3bfdcf145405307a5cc33007c8f7ee8c3b32d885 [file] [log] [blame]
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05001#
Patrick Williams2f814a62024-04-16 16:28:03 -05002# AUTOREV and PV containing '+git' needs to be set early, before any anonymous python
Andrew Geisslerfc113ea2023-03-31 09:59:46 -05003# expands anything containing PV, else the parse process won't trigger the fetcher to
4# cache the needed version data
5#
6python pokybleeding_version_handler () {
7 bpn = d.getVar("BPN")
8 # We're running before the class extension code at PreFinalise so manually fix BPN
9 bpn = bpn.replace("-nativesdk", "").replace("nativesdk-", "")
10
11 if bpn in d.getVar("POKY_AUTOREV_RECIPES").split():
12 if "pseudo" in bpn:
13 bb.warn("Here 5 %s %s" % (d.getVar("PN"), bpn))
14 d.setVar("SRCREV", "${AUTOREV}")
15 if "+git" not in d.getVar("PV"):
Patrick Williams2f814a62024-04-16 16:28:03 -050016 d.appendVar("PV", "+git")
Andrew Geisslerfc113ea2023-03-31 09:59:46 -050017}
18
19addhandler pokybleeding_version_handler
20pokybleeding_version_handler[eventmask] = "bb.event.RecipePreFinalise"