diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-03-17 17:00:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:28 +0000 |
commit | cad415dc2f0929de2f6f62fd04b56853c844c2a7 (patch) | |
tree | 2a47962c5b87b3cdb53602a0faca0c52723da61a /meta/classes/sanity.bbclass | |
parent | 96a5cb41fdec9992a7949eceae0722b7571683d2 (diff) | |
download | poky-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>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 11 |
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 | ||
37 | SANITY_DIFF_TOOL ?= "meld" | ||
38 | |||
39 | SANITY_LOCALCONF_SAMPLE ?= "${COREBASE}/meta*/conf/local.conf.sample" | ||
37 | python oecore_update_localconf() { | 40 | python 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 | ||
46 | Matching the version numbers will remove this message. | 49 | Matching 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 | ||
50 | is a good way to visualise the changes." | 53 | is 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 | ||
59 | SANITY_SITECONF_SAMPLE ?= "${COREBASE}/meta*/conf/site.conf.sample" | ||
56 | python oecore_update_siteconf() { | 60 | python 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 | ||
65 | Matching the version numbers will remove this message. | 69 | Matching 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 | ||
69 | is a good way to visualise the changes." | 73 | is 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 | ||
79 | SANITY_BBLAYERCONF_SAMPLE ?= "${COREBASE}/meta*/conf/bblayers.conf.sample" | ||
75 | python oecore_update_bblayers() { | 80 | python 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}). |
82 | Please compare your file against bblayers.conf.sample and merge any changes before continuing. | 87 | Please 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 | ||
85 | is a good way to visualise the changes.""" | 90 | is a good way to visualise the changes.""" |
86 | failmsg = d.expand(failmsg) | 91 | failmsg = d.expand(failmsg) |