summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass36
1 files changed, 26 insertions, 10 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 91ca9865fd..603994e66e 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -4,7 +4,7 @@
4 4
5def raise_sanity_error(msg): 5def raise_sanity_error(msg):
6 import bb 6 import bb
7 bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration. 7 bb.fatal(""" Poky's config sanity checker detected a potential misconfiguration.
8 Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). 8 Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
9 Following is the list of potential problems / advisories: 9 Following is the list of potential problems / advisories:
10 10
@@ -39,7 +39,7 @@ def check_sanity(e):
39 from distutils.version import LooseVersion 39 from distutils.version import LooseVersion
40 except ImportError: 40 except ImportError:
41 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 41 def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
42 import os 42 import os, commands
43 43
44 # Check the bitbake version meets minimum requirements 44 # Check the bitbake version meets minimum requirements
45 minversion = data.getVar('BB_MIN_VERSION', e.data , True) 45 minversion = data.getVar('BB_MIN_VERSION', e.data , True)
@@ -73,29 +73,45 @@ def check_sanity(e):
73 if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ): 73 if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
74 raise_sanity_error("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf" % data.getVar("DISTRO", e.data, True )) 74 raise_sanity_error("DISTRO '%s' not found. Please set a valid DISTRO in your local.conf" % data.getVar("DISTRO", e.data, True ))
75 75
76 missing = ""
77
76 if not check_app_exists("${MAKE}", e.data): 78 if not check_app_exists("${MAKE}", e.data):
77 raise_sanity_error('GNU make missing. Please install GNU make') 79 missing = missing + "GNU make,"
78 80
79 if not check_app_exists('${BUILD_PREFIX}gcc', e.data): 81 if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
80 raise_sanity_error('C Host-Compiler is missing, please install one' ) 82 missing = missing + "C Compiler,"
81 83
82 if not check_app_exists('${BUILD_PREFIX}g++', e.data): 84 if not check_app_exists('${BUILD_PREFIX}g++', e.data):
83 raise_sanity_error('C++ Host-Compiler is missing, please install one' ) 85 missing = missing + "C++ Compiler,"
84 86
85 if not check_app_exists('patch', e.data): 87 if not check_app_exists('patch', e.data):
86 raise_sanity_error('Please install the patch utility, preferable GNU patch.') 88 missing = missing + "GNU patch,"
87 89
88 if not check_app_exists('diffstat', e.data): 90 if not check_app_exists('diffstat', e.data):
89 raise_sanity_error('Please install the diffstat utility') 91 missing = missing + "diffstat,"
90 92
91 if not check_app_exists('texi2html', e.data): 93 if not check_app_exists('texi2html', e.data):
92 raise_sanity_error('Please install the texi2html binary') 94 missing = missing + "texi2html,"
93 95
94 if not check_app_exists('cvs', e.data): 96 if not check_app_exists('cvs', e.data):
95 raise_sanity_error('Please install the cvs utility') 97 missing = missing + "cvs,"
96 98
97 if not check_app_exists('svn', e.data): 99 if not check_app_exists('svn', e.data):
98 raise_sanity_error('Please install the svn utility') 100 missing = missing + "svn,"
101
102 # qemu-native needs gcc 3.x
103
104 gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
105
106 if not check_app_exists('gcc-3.4', e.data) and not check_app_exists('gcc-3.3', e.data) and gcc_version[0] != '3':
107 missing = missing + "gcc-3.x (needed for qemu-native),"
108
109 # FIXME: We also need to check for libsdl-dev and zlib-dev
110 # for qemu-native...
111
112 if not missing == "":
113 missing = missing.rstrip(',')
114 raise_sanity_error("Missing Dependencies: %s" % missing)
99 115
100 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) 116 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
101 if not oes_bb_conf: 117 if not oes_bb_conf: