diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-03-17 17:00:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 22:57:57 +0000 |
commit | 7fd08497cf780018fa144a870bdea0e7a69dae20 (patch) | |
tree | 08c4c8cde65f6f4e9552a01037e7bd5a82c80a54 /meta/classes/sanity.bbclass | |
parent | 880a346bf1bc4aa6c8569c6319c141433e13e1dd (diff) | |
download | openembedded-core-7fd08497cf780018fa144a870bdea0e7a69dae20.tar.gz openembedded-core-7fd08497cf780018fa144a870bdea0e7a69dae20.tar.bz2 openembedded-core-7fd08497cf780018fa144a870bdea0e7a69dae20.zip |
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.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 7 |
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. \"meld conf/local.conf ${COREBASE}/meta*/conf/local.conf.sample\" is a good way to visualise the changes." + failmsg = d.expand(failmsg) raise NotImplementedError(failmsg) } @@ -66,6 +67,7 @@ Matching the version numbers will remove this message. \"meld conf/site.conf ${COREBASE}/meta*/conf/site.conf.sample\" is a good way to visualise the changes." + failmsg = d.expand(failmsg) raise NotImplementedError(failmsg) } @@ -76,11 +78,12 @@ python oecore_update_bblayers() { current_lconf = int(d.getVar('LCONF_VERSION', True)) lconf_version = int(d.getVar('LAYER_CONF_VERSION', True)) - failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s). + failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}). 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.""" % (current_lconf, lconf_version) +is a good way to visualise the changes.""" + failmsg = d.expand(failmsg) if not current_lconf: raise NotImplementedError(failmsg) |