diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-06-07 16:10:48 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-06-07 16:16:35 +0100 |
commit | c4a0b5463d1fe7cbc605ae95e00d53cbc14903c2 (patch) | |
tree | beb233cae01ee5e7a15f8fe7c4d3ef5c9b33f183 /meta/classes/sanity.bbclass | |
parent | cab1009b08012cc292d9740cf6e3b0f09a29d74f (diff) | |
download | openembedded-core-c4a0b5463d1fe7cbc605ae95e00d53cbc14903c2.tar.gz openembedded-core-c4a0b5463d1fe7cbc605ae95e00d53cbc14903c2.tar.bz2 openembedded-core-c4a0b5463d1fe7cbc605ae95e00d53cbc14903c2.tar.xz openembedded-core-c4a0b5463d1fe7cbc605ae95e00d53cbc14903c2.zip |
sanity.bbclass: version each of the files in the build/conf/ directory
We already have versioning of the local.conf file but it's entirely plausible
for the bblayers.conf and site.conf to change incompatibly so we should version
those too.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index ab929ad61..8ed8975ed 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -54,12 +54,25 @@ def check_sanity(e): if data.getVar('TARGET_OS', e.data, True) == 'INVALID': messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n' - # Check we are using a valid conf setup - current_conf = data.getVar('CONF_VERSION', e.data, True) - conf_version = data.getVar('POKY_CONF_VERSION', e.data, True) + # Check we are using a valid lacal.conf + current_conf = data.getVar('CONF_VERSION', e.data, True) + conf_version = data.getVar('POKY_CONF_VERSION', e.data, True) if current_conf != conf_version: - messages = messages + "Poky has noticed your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes" + messages = messages + "Poky has noticed your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n" + + # Check bblayers.conf is valid + current_lconf = data.getVar('LCONF_VERSION', e.data, True) + lconf_version = data.getVar('LAYER_CONF_VERSION', e.data, True) + if current_lconf != lconf_version: + messages = messages + "Poky has noticed your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n" + + # If we have a site.conf, check it's valid + if check_conf_exists("conf/site.conf", e.data): + current_sconf = data.getVar('SCONF_VERSION', e.data, True) + sconf_version = data.getVar('SITE_CONF_VERSION', e.data, True) + if current_sconf != sconf_version: + messages = messages + "Poky has noticed your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n" assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split() # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf |