summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/sanity.bbclass25
1 files changed, 17 insertions, 8 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index ddab036f6a..8b5526075c 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -85,13 +85,12 @@ def check_sanity(e):
85 missing = missing + "GNU make," 85 missing = missing + "GNU make,"
86 86
87 if not check_app_exists('${BUILD_PREFIX}gcc', e.data): 87 if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
88 missing = missing + "C Compiler," 88 missing = missing + "C Compiler (${BUILD_PREFIX}gcc),"
89 89
90 if not check_app_exists('${BUILD_PREFIX}g++', e.data): 90 if not check_app_exists('${BUILD_PREFIX}g++', e.data):
91 missing = missing + "C++ Compiler," 91 missing = missing + "C++ Compiler (${BUILD_PREFIX}g++),"
92
93 required_utilities = "patch diffstat help2man texi2html cvs svn bzip2 tar gzip gawk makeinfo"
94 92
93 required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum"
95 94
96 # qemu-native needs gcc 3.x 95 # qemu-native needs gcc 3.x
97 if "qemu-native" not in assume_provided: 96 if "qemu-native" not in assume_provided:
@@ -115,18 +114,28 @@ def check_sanity(e):
115 messages = messages + "Please use a umask which allows a+rx and u+rwx\n" 114 messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
116 os.umask(omask) 115 os.umask(omask)
117 116
118 if messages != "":
119 raise_sanity_error(messages)
120
121 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) 117 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
122 if not oes_bb_conf: 118 if not oes_bb_conf:
123 raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf') 119 messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf\n'
120
121 if messages != "":
122 raise_sanity_error(messages)
124 123
125addhandler check_sanity_eventhandler 124addhandler check_sanity_eventhandler
126python check_sanity_eventhandler() { 125python check_sanity_eventhandler() {
127 from bb import note, error, data, __version__ 126 from bb import note, error, data, __version__
128 from bb.event import getName 127 from bb.event import getName
129 128
129 try:
130 from distutils.version import LooseVersion
131 except ImportError:
132 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
133
134 if (LooseVersion(bb.__version__) > LooseVersion("1.8.6")):
135 if getName(e) == "ConfigParsed":
136 check_sanity(e)
137 return NotHandled
138
130 if getName(e) == "BuildStarted": 139 if getName(e) == "BuildStarted":
131 check_sanity(e) 140 check_sanity(e)
132 141