summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2010-12-16 11:10:09 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-20 14:51:22 +0000
commit2ec7757a48f298232bf9918a55b46503d5d21025 (patch)
tree37beada74bf28579ed00bf03e1e7e8672730c73e /meta
parent834f0c5a8de2558ac830f4b280a0d4043206f26d (diff)
downloadpoky-2ec7757a48f298232bf9918a55b46503d5d21025.tar.gz
sanity.bbclass: make indenting consistent
Use four spaces throughout the file Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass432
1 files changed, 216 insertions, 216 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index bc02a828c4..6dc4716af4 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -3,240 +3,240 @@
3# 3#
4 4
5def raise_sanity_error(msg): 5def raise_sanity_error(msg):
6 bb.fatal(""" Poky's config sanity checker detected a potential misconfiguration. 6 bb.fatal(""" Poky's config sanity checker detected a potential misconfiguration.
7 Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). 7 Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
8 Following is the list of potential problems / advisories: 8 Following is the list of potential problems / advisories:
9 9
10 %s""" % msg) 10 %s""" % msg)
11 11
12def check_conf_exists(fn, data): 12def check_conf_exists(fn, data):
13 bbpath = [] 13 bbpath = []
14 fn = bb.data.expand(fn, data) 14 fn = bb.data.expand(fn, data)
15 vbbpath = bb.data.getVar("BBPATH", data) 15 vbbpath = bb.data.getVar("BBPATH", data)
16 if vbbpath: 16 if vbbpath:
17 bbpath += vbbpath.split(":") 17 bbpath += vbbpath.split(":")
18 for p in bbpath: 18 for p in bbpath:
19 currname = os.path.join(bb.data.expand(p, data), fn) 19 currname = os.path.join(bb.data.expand(p, data), fn)
20 if os.access(currname, os.R_OK): 20 if os.access(currname, os.R_OK):
21 return True 21 return True
22 return False 22 return False
23 23
24def check_sanity(e): 24def check_sanity(e):
25 from bb import note, error, data, __version__ 25 from bb import note, error, data, __version__
26 26
27 try: 27 try:
28 from distutils.version import LooseVersion 28 from distutils.version import LooseVersion
29 except ImportError: 29 except ImportError:
30 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 30 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
31 import commands 31 import commands
32 32
33 # Check the bitbake version meets minimum requirements 33 # Check the bitbake version meets minimum requirements
34 minversion = data.getVar('BB_MIN_VERSION', e.data , True) 34 minversion = data.getVar('BB_MIN_VERSION', e.data , True)
35 if not minversion: 35 if not minversion:
36 # Hack: BB_MIN_VERSION hasn't been parsed yet so return 36 # Hack: BB_MIN_VERSION hasn't been parsed yet so return
37 # and wait for the next call 37 # and wait for the next call
38 print "Foo %s" % minversion 38 print "Foo %s" % minversion
39 return 39 return
40 40
41 if 0 == os.getuid(): 41 if 0 == os.getuid():
42 raise_sanity_error("Do not use Bitbake as root.") 42 raise_sanity_error("Do not use Bitbake as root.")
43 43
44 messages = "" 44 messages = ""
45 45
46 # Check the Python version, we now use Python 2.6 features in 46 # Check the Python version, we now use Python 2.6 features in
47 # various classes 47 # various classes
48 import sys 48 import sys
49 if sys.hexversion < 0x020600F0: 49 if sys.hexversion < 0x020600F0:
50 messages = messages + 'Poky requires at least Python 2.6 to run. Please update your Python interpreter.\n' 50 messages = messages + 'Poky requires at least Python 2.6 to run. Please update your Python interpreter.\n'
51 51
52 if (LooseVersion(__version__) < LooseVersion(minversion)): 52 if (LooseVersion(__version__) < LooseVersion(minversion)):
53 messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__) 53 messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
54 54
55 # Check TARGET_ARCH is set 55 # Check TARGET_ARCH is set
56 if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID': 56 if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID':
57 messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n' 57 messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n'
58 58
59 # Check TARGET_OS is set 59 # Check TARGET_OS is set
60 if data.getVar('TARGET_OS', e.data, True) == 'INVALID': 60 if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
61 messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n' 61 messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
62 62
63 # Check we are using a valid lacal.conf 63 # Check we are using a valid lacal.conf
64 current_conf = data.getVar('CONF_VERSION', e.data, True) 64 current_conf = data.getVar('CONF_VERSION', e.data, True)
65 conf_version = data.getVar('POKY_CONF_VERSION', e.data, True) 65 conf_version = data.getVar('POKY_CONF_VERSION', e.data, True)
66 66
67 if current_conf != conf_version: 67 if current_conf != conf_version:
68 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" 68 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"
69 69
70 # Check bblayers.conf is valid 70 # Check bblayers.conf is valid
71 current_lconf = data.getVar('LCONF_VERSION', e.data, True) 71 current_lconf = data.getVar('LCONF_VERSION', e.data, True)
72 lconf_version = data.getVar('LAYER_CONF_VERSION', e.data, True) 72 lconf_version = data.getVar('LAYER_CONF_VERSION', e.data, True)
73 if current_lconf != lconf_version: 73 if current_lconf != lconf_version:
74 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" 74 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"
75 75
76 # If we have a site.conf, check it's valid 76 # If we have a site.conf, check it's valid
77 if check_conf_exists("conf/site.conf", e.data): 77 if check_conf_exists("conf/site.conf", e.data):
78 current_sconf = data.getVar('SCONF_VERSION', e.data, True) 78 current_sconf = data.getVar('SCONF_VERSION', e.data, True)
79 sconf_version = data.getVar('SITE_CONF_VERSION', e.data, True) 79 sconf_version = data.getVar('SITE_CONF_VERSION', e.data, True)
80 if current_sconf != sconf_version: 80 if current_sconf != sconf_version:
81 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" 81 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"
82 82
83 assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split() 83 assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
84 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf 84 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
85 if "diffstat-native" not in assume_provided: 85 if "diffstat-native" not in assume_provided:
86 messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n' 86 messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
87 87
88 # Check that the MACHINE is valid, if it is set 88 # Check that the MACHINE is valid, if it is set
89 if data.getVar('MACHINE', e.data, True): 89 if data.getVar('MACHINE', e.data, True):
90 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data): 90 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
91 messages = messages + 'Please set a valid MACHINE in your local.conf\n' 91 messages = messages + 'Please set a valid MACHINE in your local.conf\n'
92 92
93 # Check that the DISTRO is valid 93 # Check that the DISTRO is valid
94 # need to take into account DISTRO renaming DISTRO 94 # need to take into account DISTRO renaming DISTRO
95 if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ): 95 if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
96 messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True ) 96 messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
97 97
98 missing = "" 98 missing = ""
99 99
100 if not check_app_exists("${MAKE}", e.data): 100 if not check_app_exists("${MAKE}", e.data):
101 missing = missing + "GNU make," 101 missing = missing + "GNU make,"
102 102
103 if not check_app_exists('${BUILD_PREFIX}gcc', e.data): 103 if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
104 missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", e.data, True) 104 missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", e.data, True)
105 105
106 if not check_app_exists('${BUILD_PREFIX}g++', e.data): 106 if not check_app_exists('${BUILD_PREFIX}g++', e.data):
107 missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", e.data, True) 107 missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", e.data, True)
108 108
109 required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk hg chrpath wget" 109 required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk hg chrpath wget"
110 110
111 # qemu-native needs gcc 3.x 111 # qemu-native needs gcc 3.x
112 if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided: 112 if "qemu-native" not in assume_provided and "gcc3-native" in assume_provided:
113 gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '") 113 gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
114 114
115 if not check_gcc3(e.data) and gcc_version[0] != '3': 115 if not check_gcc3(e.data) and gcc_version[0] != '3':
116 messages = messages + "gcc3-native was in ASSUME_PROVIDED but the gcc-3.x binary can't be found in PATH" 116 messages = messages + "gcc3-native was in ASSUME_PROVIDED but the gcc-3.x binary can't be found in PATH"
117 missing = missing + "gcc-3.x (needed for qemu-native)," 117 missing = missing + "gcc-3.x (needed for qemu-native),"
118 118
119 if "qemu-native" in assume_provided: 119 if "qemu-native" in assume_provided:
120 if not check_app_exists("qemu-arm", e.data): 120 if not check_app_exists("qemu-arm", e.data):
121 messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH" 121 messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
122 122
123 if data.getVar('TARGET_ARCH', e.data, True) == "arm": 123 if data.getVar('TARGET_ARCH', e.data, True) == "arm":
124 # This path is no longer user-readable in modern (very recent) Linux 124 # This path is no longer user-readable in modern (very recent) Linux
125 try: 125 try:
126 if os.path.exists("/proc/sys/vm/mmap_min_addr"): 126 if os.path.exists("/proc/sys/vm/mmap_min_addr"):
127 f = file("/proc/sys/vm/mmap_min_addr", "r") 127 f = file("/proc/sys/vm/mmap_min_addr", "r")
128 if (f.read().strip() != "0"): 128 if (f.read().strip() != "0"):
129 messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n" 129 messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
130 f.close() 130 f.close()
131 except: 131 except:
132 pass 132 pass
133 133
134 for util in required_utilities.split(): 134 for util in required_utilities.split():
135 if not check_app_exists( util, e.data ): 135 if not check_app_exists( util, e.data ):
136 missing = missing + "%s," % util 136 missing = missing + "%s," % util
137 137
138 if missing != "": 138 if missing != "":
139 missing = missing.rstrip(',') 139 missing = missing.rstrip(',')
140 messages = messages + "Please install following missing utilities: %s\n" % missing 140 messages = messages + "Please install following missing utilities: %s\n" % missing
141 141
142 # Check if DISPLAY is set if IMAGETEST is set 142 # Check if DISPLAY is set if IMAGETEST is set
143 if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu': 143 if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
144 messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n' 144 messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
145 145
146 # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating 146 # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating
147 termcmd = data.getVar("TERMCMD", e.data, True) 147 termcmd = data.getVar("TERMCMD", e.data, True)
148 term = termcmd.split()[0] 148 term = termcmd.split()[0]
149 if not check_app_exists(term, e.data): 149 if not check_app_exists(term, e.data):
150 messages = messages + "The console for use in patch error resolution is not available, please install %s or set TERMCMD and TERMCMDRUN (as documented in local.conf).\n" % term 150 messages = messages + "The console for use in patch error resolution is not available, please install %s or set TERMCMD and TERMCMDRUN (as documented in local.conf).\n" % term
151 151
152 if os.path.basename(os.readlink('/bin/sh')) == 'dash': 152 if os.path.basename(os.readlink('/bin/sh')) == 'dash':
153 messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n" 153 messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n"
154 154
155 omask = os.umask(022) 155 omask = os.umask(022)
156 if omask & 0755: 156 if omask & 0755:
157 messages = messages + "Please use a umask which allows a+rx and u+rwx\n" 157 messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
158 os.umask(omask) 158 os.umask(omask)
159 159
160 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) 160 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
161 if not oes_bb_conf: 161 if not oes_bb_conf:
162 messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n' 162 messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
163 163
164 if data.getVar('SDK_ARCH', e.data, True) == 'i686': 164 if data.getVar('SDK_ARCH', e.data, True) == 'i686':
165 messages = messages + '"Please set SDKMACHINE to i586. It is currently defaulting to the build machine architecture of i686 and this is known to have issues (see local.conf).\n' 165 messages = messages + '"Please set SDKMACHINE to i586. It is currently defaulting to the build machine architecture of i686 and this is known to have issues (see local.conf).\n'
166 166
167 nolibs = data.getVar('NO32LIBS', e.data, True) 167 nolibs = data.getVar('NO32LIBS', e.data, True)
168 if not nolibs: 168 if not nolibs:
169 lib32path = '/lib' 169 lib32path = '/lib'
170 if os.path.exists('/lib64') and os.path.islink('/lib64'): 170 if os.path.exists('/lib64') and os.path.islink('/lib64'):
171 lib32path = '/lib32' 171 lib32path = '/lib32'
172 172
173 if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'): 173 if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
174 messages = messages + "You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n" 174 messages = messages + "You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n"
175 175
176 # 176 #
177 # Check that TMPDIR hasn't changed location since the last time we were run 177 # Check that TMPDIR hasn't changed location since the last time we were run
178 # 178 #
179 tmpdir = data.getVar('TMPDIR', e.data, True) 179 tmpdir = data.getVar('TMPDIR', e.data, True)
180 checkfile = os.path.join(tmpdir, "saved_tmpdir") 180 checkfile = os.path.join(tmpdir, "saved_tmpdir")
181 if os.path.exists(checkfile): 181 if os.path.exists(checkfile):
182 f = file(checkfile, "r") 182 f = file(checkfile, "r")
183 saved_tmpdir = f.read().strip() 183 saved_tmpdir = f.read().strip()
184 if (saved_tmpdir != tmpdir): 184 if (saved_tmpdir != tmpdir):
185 messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir 185 messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir
186 else: 186 else:
187 f = file(checkfile, "w") 187 f = file(checkfile, "w")
188 f.write(tmpdir) 188 f.write(tmpdir)
189 f.close() 189 f.close()
190 190
191 # 191 #
192 # Check the 'ABI' of TMPDIR 192 # Check the 'ABI' of TMPDIR
193 # 193 #
194 current_abi = data.getVar('OELAYOUT_ABI', e.data, True) 194 current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
195 abifile = data.getVar('SANITY_ABIFILE', e.data, True) 195 abifile = data.getVar('SANITY_ABIFILE', e.data, True)
196 if os.path.exists(abifile): 196 if os.path.exists(abifile):
197 f = file(abifile, "r") 197 f = file(abifile, "r")
198 abi = f.read().strip() 198 abi = f.read().strip()
199 if not abi.isdigit(): 199 if not abi.isdigit():
200 f = file(abifile, "w") 200 f = file(abifile, "w")
201 f.write(current_abi) 201 f.write(current_abi)
202 elif abi == "2" and current_abi == "3": 202 elif abi == "2" and current_abi == "3":
203 bb.note("Converting staging from layout version 2 to layout version 3") 203 bb.note("Converting staging from layout version 2 to layout version 3")
204 os.system(bb.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots", e.data)) 204 os.system(bb.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots", e.data))
205 os.system(bb.data.expand("ln -s sysroots ${TMPDIR}/staging", e.data)) 205 os.system(bb.data.expand("ln -s sysroots ${TMPDIR}/staging", e.data))
206 os.system(bb.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done", e.data)) 206 os.system(bb.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done", e.data))
207 f = file(abifile, "w") 207 f = file(abifile, "w")
208 f.write(current_abi) 208 f.write(current_abi)
209 elif abi == "3" and current_abi == "4": 209 elif abi == "3" and current_abi == "4":
210 bb.note("Converting staging layout from version 3 to layout version 4") 210 bb.note("Converting staging layout from version 3 to layout version 4")
211 if os.path.exists(bb.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data)): 211 if os.path.exists(bb.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data)):
212 os.system(bb.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}", e.data)) 212 os.system(bb.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}", e.data))
213 os.system(bb.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data)) 213 os.system(bb.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}", e.data))
214 214
215 f = file(abifile, "w") 215 f = file(abifile, "w")
216 f.write(current_abi) 216 f.write(current_abi)
217 elif abi == "4": 217 elif abi == "4":
218 messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n" 218 messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
219 elif abi == "5" and current_abi == "6": 219 elif abi == "5" and current_abi == "6":
220 bb.note("Converting staging layout from version 5 to layout version 6") 220 bb.note("Converting staging layout from version 5 to layout version 6")
221 os.system(bb.data.expand("mv ${TMPDIR}/pstagelogs ${TMPDIR}/sstate-control", e.data)) 221 os.system(bb.data.expand("mv ${TMPDIR}/pstagelogs ${TMPDIR}/sstate-control", e.data))
222 f = file(abifile, "w") 222 f = file(abifile, "w")
223 f.write(current_abi) 223 f.write(current_abi)
224 elif (abi != current_abi): 224 elif (abi != current_abi):
225 # Code to convert from one ABI to another could go here if possible. 225 # Code to convert from one ABI to another could go here if possible.
226 messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi) 226 messages = messages + "Error, TMPDIR has changed ABI (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
227 else: 227 else:
228 f = file(abifile, "w") 228 f = file(abifile, "w")
229 f.write(current_abi) 229 f.write(current_abi)
230 f.close() 230 f.close()
231 231
232 oeroot = data.getVar('POKYBASE', e.data) 232 oeroot = data.getVar('POKYBASE', e.data)
233 if oeroot.find ('+') != -1: 233 if oeroot.find ('+') != -1:
234 messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +." 234 messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +."
235 elif oeroot.find (' ') != -1: 235 elif oeroot.find (' ') != -1:
236 messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space." 236 messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
237 237
238 if messages != "": 238 if messages != "":
239 raise_sanity_error(messages) 239 raise_sanity_error(messages)
240 240
241addhandler check_sanity_eventhandler 241addhandler check_sanity_eventhandler
242python check_sanity_eventhandler() { 242python check_sanity_eventhandler() {