summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2008-10-27 18:46:51 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2008-10-27 19:28:26 +0000
commit6f97a5881773a20ded15041b36c511881c9bc579 (patch)
treef046f450c0f382e07a20e706e0b4c24eee921719 /classes
parent0ae63176b8bbb40dcc1fdaa0ecf8c3fb736ea982 (diff)
classes/conf: Handle Distro PR change in sanity.bbclass
This patch: * Moves the ABI variables into a new abi_version.conf (like Poky). * Renames SANITY_ABI to OELAYOUT_ABI since it has uses outside sanity.bbclass and sanity.conf. * Adds checks to sanity.bbclass so the user is notified when DISTRO_PR changes in a similar way to the OELAYOUT_ABI versions.
Diffstat (limited to 'classes')
-rw-r--r--classes/sanity.bbclass18
1 files changed, 17 insertions, 1 deletions
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index b925d05e18..c9effb5596 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -140,7 +140,7 @@ def check_sanity(e):
#
# Check the 'ABI' of TMPDIR
#
- current_abi = data.getVar('SANITY_ABI', e.data, True)
+ current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
abifile = data.getVar('SANITY_ABIFILE', e.data, True)
if os.path.exists(abifile):
f = file(abifile, "r")
@@ -156,6 +156,22 @@ def check_sanity(e):
f.write(current_abi)
f.close()
+ #
+ # Check the Distro PR value didn't change
+ #
+ distro_pr = data.getVar('DISTRO_PR', e.data, True)
+ prfile = data.getVar('SANITY_PRFILE', e.data, True)
+ if os.path.exists(prfile):
+ f = file(prfile, "r")
+ pr = f.read().strip()
+ if (pr != distro_pr):
+ # Code to convert from one ABI to another could go here if possible.
+ messages = messages + "Error, DISTRO_PR has changed (%s to %s) which means all packages need to rebuild. Please remove your TMPDIR so this can happen. For autobuilder setups you can avoid this by using a TMPDIR that include DISTRO_PR in the path.\n" % (pr, distro_pr)
+ else:
+ f = file(prfile, "w")
+ f.write(distro_pr)
+ f.close()
+
if messages != "":
raise_sanity_error(messages)