summaryrefslogtreecommitdiffstats
path: root/meta-poky/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta-poky/classes')
-rw-r--r--meta-poky/classes/poky-bleeding.bbclass23
-rw-r--r--meta-poky/classes/poky-sanity.bbclass6
2 files changed, 26 insertions, 3 deletions
diff --git a/meta-poky/classes/poky-bleeding.bbclass b/meta-poky/classes/poky-bleeding.bbclass
new file mode 100644
index 0000000000..fe558f25a8
--- /dev/null
+++ b/meta-poky/classes/poky-bleeding.bbclass
@@ -0,0 +1,23 @@
1#
2# AUTOREV and PV containing '+git' needs to be set early, before any anonymous python
3# 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 d.setVar("SRCREV", "${AUTOREV}")
13 srcrev_format = d.getVar("SRCREV_FORMAT")
14 if srcrev_format:
15 for multi_scm in d.getVar("SRCREV_FORMAT").split("_"):
16 if multi_scm != "":
17 d.setVar("SRCREV_%s" % multi_scm, "${AUTOREV}")
18 if "+git" not in d.getVar("PV"):
19 d.appendVar("PV", "+git")
20}
21
22addhandler pokybleeding_version_handler
23pokybleeding_version_handler[eventmask] = "bb.event.RecipePreFinalise"
diff --git a/meta-poky/classes/poky-sanity.bbclass b/meta-poky/classes/poky-sanity.bbclass
index 81cd2eb6a6..a068c7368c 100644
--- a/meta-poky/classes/poky-sanity.bbclass
+++ b/meta-poky/classes/poky-sanity.bbclass
@@ -1,8 +1,8 @@
1# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades 1# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
2 2
3python poky_update_bblayersconf() { 3python poky_update_bblayersconf() {
4 current_version = int(d.getVar('POKY_BBLAYERS_CONF_VERSION', True) or -1) 4 current_version = int(d.getVar('POKY_BBLAYERS_CONF_VERSION') or -1)
5 latest_version = int(d.getVar('REQUIRED_POKY_BBLAYERS_CONF_VERSION', True) or -1) 5 latest_version = int(d.getVar('REQUIRED_POKY_BBLAYERS_CONF_VERSION') or -1)
6 if current_version == -1 or latest_version == -1: 6 if current_version == -1 or latest_version == -1:
7 # one or the other missing => malformed configuration 7 # one or the other missing => malformed configuration
8 raise NotImplementedError("You need to update bblayers.conf manually for this version transition") 8 raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
@@ -11,7 +11,7 @@ python poky_update_bblayersconf() {
11 11
12 # check for out of date templateconf.cfg file 12 # check for out of date templateconf.cfg file
13 lines = [] 13 lines = []
14 fn = os.path.join(d.getVar('TOPDIR', True), 'conf/templateconf.cfg') 14 fn = os.path.join(d.getVar('TOPDIR'), 'conf/templateconf.cfg')
15 15
16 lines = sanity_conf_read(fn) 16 lines = sanity_conf_read(fn)
17 index, meta_yocto_line = sanity_conf_find_line(r'^meta-yocto/', lines) 17 index, meta_yocto_line = sanity_conf_find_line(r'^meta-yocto/', lines)