summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-03-17 17:00:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:28 +0000
commit805aca81925a95931ceda8298aa582b57ceba48b (patch)
tree6bbe899500a745dfd81ff126230823475384735f
parent7d6801c46539035ae901d245b5376a392f8f9ce2 (diff)
downloadpoky-805aca81925a95931ceda8298aa582b57ceba48b.tar.gz
sanity.bbclass: expand error messages for version checks
The ${WORKDIR} variable was not getting expanded (anymore?), leading to less helpful error messages like: Exception: NotImplementedError: Your version of bblayers.conf has the wrong LCONF_VERSION (has 7, expecting 8). Please compare your file against bblayers.conf.sample and merge any changes before continuing. "meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample" is a good way to visualise the changes. ERROR: Execution of event handler 'check_sanity_eventhandler' failed After adding expansion, embedding ${LCONF_VERSION} and ${LAYER_CONF_VERSION} in the error message seems a bit more readable and consistent. (From OE-Core rev: 7fd08497cf780018fa144a870bdea0e7a69dae20) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4873e64a79..334e362632 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -48,6 +48,7 @@ Matching the version numbers will remove this message.
48\"meld conf/local.conf ${COREBASE}/meta*/conf/local.conf.sample\" 48\"meld conf/local.conf ${COREBASE}/meta*/conf/local.conf.sample\"
49 49
50is a good way to visualise the changes." 50is a good way to visualise the changes."
51 failmsg = d.expand(failmsg)
51 52
52 raise NotImplementedError(failmsg) 53 raise NotImplementedError(failmsg)
53} 54}
@@ -66,6 +67,7 @@ Matching the version numbers will remove this message.
66\"meld conf/site.conf ${COREBASE}/meta*/conf/site.conf.sample\" 67\"meld conf/site.conf ${COREBASE}/meta*/conf/site.conf.sample\"
67 68
68is a good way to visualise the changes." 69is a good way to visualise the changes."
70 failmsg = d.expand(failmsg)
69 71
70 raise NotImplementedError(failmsg) 72 raise NotImplementedError(failmsg)
71} 73}
@@ -76,11 +78,12 @@ python oecore_update_bblayers() {
76 current_lconf = int(d.getVar('LCONF_VERSION', True)) 78 current_lconf = int(d.getVar('LCONF_VERSION', True))
77 lconf_version = int(d.getVar('LAYER_CONF_VERSION', True)) 79 lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
78 80
79 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s). 81 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}).
80Please compare your file against bblayers.conf.sample and merge any changes before continuing. 82Please compare your file against bblayers.conf.sample and merge any changes before continuing.
81"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample" 83"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample"
82 84
83is a good way to visualise the changes.""" % (current_lconf, lconf_version) 85is a good way to visualise the changes."""
86 failmsg = d.expand(failmsg)
84 87
85 if not current_lconf: 88 if not current_lconf:
86 raise NotImplementedError(failmsg) 89 raise NotImplementedError(failmsg)