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.bbclass13
1 files changed, 4 insertions, 9 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e11bdd2218..39f1e22003 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -3,7 +3,6 @@
3# 3#
4 4
5def raise_sanity_error(msg): 5def raise_sanity_error(msg):
6 import bb
7 bb.fatal(""" Poky's config sanity checker detected a potential misconfiguration. 6 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). 7 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: 8 Following is the list of potential problems / advisories:
@@ -11,8 +10,6 @@ def raise_sanity_error(msg):
11 %s""" % msg) 10 %s""" % msg)
12 11
13def check_conf_exists(fn, data): 12def check_conf_exists(fn, data):
14 import bb, os
15
16 bbpath = [] 13 bbpath = []
17 fn = bb.data.expand(fn, data) 14 fn = bb.data.expand(fn, data)
18 vbbpath = bb.data.getVar("BBPATH", data) 15 vbbpath = bb.data.getVar("BBPATH", data)
@@ -26,12 +23,12 @@ def check_conf_exists(fn, data):
26 23
27def check_sanity(e): 24def check_sanity(e):
28 from bb import note, error, data, __version__ 25 from bb import note, error, data, __version__
29 from bb.event import Handled, NotHandled, getName 26
30 try: 27 try:
31 from distutils.version import LooseVersion 28 from distutils.version import LooseVersion
32 except ImportError: 29 except ImportError:
33 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
34 import os, commands 31 import commands
35 32
36 # Check the bitbake version meets minimum requirements 33 # Check the bitbake version meets minimum requirements
37 minversion = data.getVar('BB_MIN_VERSION', e.data , True) 34 minversion = data.getVar('BB_MIN_VERSION', e.data , True)
@@ -163,10 +160,8 @@ def check_sanity(e):
163 160
164addhandler check_sanity_eventhandler 161addhandler check_sanity_eventhandler
165python check_sanity_eventhandler() { 162python check_sanity_eventhandler() {
166 from bb import note, error, data, __version__ 163 from bb.event import Handled, NotHandled
167 from bb.event import getName 164 if bb.event.getName(e) == "ConfigParsed":
168
169 if getName(e) == "ConfigParsed":
170 check_sanity(e) 165 check_sanity(e)
171 166
172 return NotHandled 167 return NotHandled