]> code.ossystems Code Review - openembedded-core.git/commitdiff
Version the build configuration directory
authorJoshua Lock <josh@linux.intel.com>
Thu, 29 Apr 2010 12:34:05 +0000 (13:34 +0100)
committerJoshua Lock <josh@linux.intel.com>
Fri, 30 Apr 2010 15:25:41 +0000 (16:25 +0100)
The addition of BBLAYERS changes the build/conf directory to be incompatible
with the "old way" in the Purple release.

As such things are likely to occur in future we should bersion the build/conf
directory through local.conf

Signed-off-by: Joshua Lock <josh@linux.intel.com>
build/conf/local.conf.sample
meta/classes/sanity.bbclass
meta/conf/sanity.conf

index 959a3b9a3e857b4f9cdbbba44bea707e9b452b62..6285821d520b53c4cf2d3702fa526a827f7b7659 100644 (file)
@@ -1,3 +1,6 @@
+# CONF_VERSION is increased each time build/conf/ changes incompatibly
+CONF_VERSION = "1"
+
 # Where to cache the files Poky downloads
 DL_DIR ?= "${OEROOT}/sources"
 # Where to cache Poky's built staging output
index 364a4e4af980111c47475dc0da6f6034c1075305..208f65ff5ad9b61e37cbf722162f8372fef59b91 100644 (file)
@@ -54,6 +54,13 @@ 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)
+
+        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")
+
        assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
        # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
        if "diffstat-native" not in assume_provided:
index 7cc348ec94e420d72dbeb9e15a0579dbc331b810..c9d77794cf9f20e856d99c55c86f90d0fa849307 100644 (file)
@@ -7,5 +7,7 @@ BB_MIN_VERSION = "1.8.10"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
 
+POKY_CONF_VERSION = "1"
+
 INHERIT += "sanity"