summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-03-17 17:00:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:28 +0000
commitcad415dc2f0929de2f6f62fd04b56853c844c2a7 (patch)
tree2a47962c5b87b3cdb53602a0faca0c52723da61a
parent96a5cb41fdec9992a7949eceae0722b7571683d2 (diff)
downloadpoky-cad415dc2f0929de2f6f62fd04b56853c844c2a7.tar.gz
sanity.bbclass: allow customizing config file update error messages
The default file pattern may be amiguous and "meld" might not always be the preferred tool, so allow distros to override those parts of the error messages. (From OE-Core rev: 98fc50436dfa5d0e5bee0930154a5563ffc8151d) 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.bbclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 2539bd8c1b..e72a007078 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -34,6 +34,9 @@ BBLAYERS_CONF_UPDATE_FUNCS += " \
34 conf/site.conf:SCONF_VERSION:SITE_CONF_VERSION:oecore_update_siteconf \ 34 conf/site.conf:SCONF_VERSION:SITE_CONF_VERSION:oecore_update_siteconf \
35" 35"
36 36
37SANITY_DIFF_TOOL ?= "meld"
38
39SANITY_LOCALCONF_SAMPLE ?= "${COREBASE}/meta*/conf/local.conf.sample"
37python oecore_update_localconf() { 40python oecore_update_localconf() {
38 # Check we are using a valid local.conf 41 # Check we are using a valid local.conf
39 current_conf = d.getVar('CONF_VERSION', True) 42 current_conf = d.getVar('CONF_VERSION', True)
@@ -45,7 +48,7 @@ files and merge any changes before continuing.
45 48
46Matching the version numbers will remove this message. 49Matching the version numbers will remove this message.
47 50
48\"meld conf/local.conf ${COREBASE}/meta*/conf/local.conf.sample\" 51\"${SANITY_DIFF_TOOL} conf/local.conf ${SANITY_LOCALCONF_SAMPLE}\"
49 52
50is a good way to visualise the changes." 53is a good way to visualise the changes."
51 failmsg = d.expand(failmsg) 54 failmsg = d.expand(failmsg)
@@ -53,6 +56,7 @@ is a good way to visualise the changes."
53 raise NotImplementedError(failmsg) 56 raise NotImplementedError(failmsg)
54} 57}
55 58
59SANITY_SITECONF_SAMPLE ?= "${COREBASE}/meta*/conf/site.conf.sample"
56python oecore_update_siteconf() { 60python oecore_update_siteconf() {
57 # If we have a site.conf, check it's valid 61 # If we have a site.conf, check it's valid
58 current_sconf = d.getVar('SCONF_VERSION', True) 62 current_sconf = d.getVar('SCONF_VERSION', True)
@@ -64,7 +68,7 @@ files and merge any changes before continuing.
64 68
65Matching the version numbers will remove this message. 69Matching the version numbers will remove this message.
66 70
67\"meld conf/site.conf ${COREBASE}/meta*/conf/site.conf.sample\" 71\"${SANITY_DIFF_TOOL} conf/site.conf ${SANITY_SITECONF_SAMPLE}\"
68 72
69is a good way to visualise the changes." 73is a good way to visualise the changes."
70 failmsg = d.expand(failmsg) 74 failmsg = d.expand(failmsg)
@@ -72,6 +76,7 @@ is a good way to visualise the changes."
72 raise NotImplementedError(failmsg) 76 raise NotImplementedError(failmsg)
73} 77}
74 78
79SANITY_BBLAYERCONF_SAMPLE ?= "${COREBASE}/meta*/conf/bblayers.conf.sample"
75python oecore_update_bblayers() { 80python oecore_update_bblayers() {
76 # bblayers.conf is out of date, so see if we can resolve that 81 # bblayers.conf is out of date, so see if we can resolve that
77 82
@@ -80,7 +85,7 @@ python oecore_update_bblayers() {
80 85
81 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}). 86 failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}).
82Please compare your file against bblayers.conf.sample and merge any changes before continuing. 87Please compare your file against bblayers.conf.sample and merge any changes before continuing.
83"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample" 88"${SANITY_DIFF_TOOL} conf/bblayers.conf ${SANITY_BBLAYERCONF_SAMPLE}"
84 89
85is a good way to visualise the changes.""" 90is a good way to visualise the changes."""
86 failmsg = d.expand(failmsg) 91 failmsg = d.expand(failmsg)