mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
sanity.bbclass: Run sanity checks before parsing for speed, sync with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2485 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -85,13 +85,12 @@ def check_sanity(e):
|
|||||||
missing = missing + "GNU make,"
|
missing = missing + "GNU make,"
|
||||||
|
|
||||||
if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
|
if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
|
||||||
missing = missing + "C Compiler,"
|
missing = missing + "C Compiler (${BUILD_PREFIX}gcc),"
|
||||||
|
|
||||||
if not check_app_exists('${BUILD_PREFIX}g++', e.data):
|
if not check_app_exists('${BUILD_PREFIX}g++', e.data):
|
||||||
missing = missing + "C++ Compiler,"
|
missing = missing + "C++ Compiler (${BUILD_PREFIX}g++),"
|
||||||
|
|
||||||
required_utilities = "patch diffstat help2man texi2html cvs svn bzip2 tar gzip gawk makeinfo"
|
|
||||||
|
|
||||||
|
required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn bzip2 tar gzip gawk md5sum"
|
||||||
|
|
||||||
# qemu-native needs gcc 3.x
|
# qemu-native needs gcc 3.x
|
||||||
if "qemu-native" not in assume_provided:
|
if "qemu-native" not in assume_provided:
|
||||||
@@ -115,18 +114,28 @@ def check_sanity(e):
|
|||||||
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
|
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
|
||||||
os.umask(omask)
|
os.umask(omask)
|
||||||
|
|
||||||
if messages != "":
|
|
||||||
raise_sanity_error(messages)
|
|
||||||
|
|
||||||
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
|
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
|
||||||
if not oes_bb_conf:
|
if not oes_bb_conf:
|
||||||
raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf')
|
messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf\n'
|
||||||
|
|
||||||
|
if messages != "":
|
||||||
|
raise_sanity_error(messages)
|
||||||
|
|
||||||
addhandler check_sanity_eventhandler
|
addhandler check_sanity_eventhandler
|
||||||
python check_sanity_eventhandler() {
|
python check_sanity_eventhandler() {
|
||||||
from bb import note, error, data, __version__
|
from bb import note, error, data, __version__
|
||||||
from bb.event import getName
|
from bb.event import getName
|
||||||
|
|
||||||
|
try:
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
except ImportError:
|
||||||
|
def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
|
||||||
|
|
||||||
|
if (LooseVersion(bb.__version__) > LooseVersion("1.8.6")):
|
||||||
|
if getName(e) == "ConfigParsed":
|
||||||
|
check_sanity(e)
|
||||||
|
return NotHandled
|
||||||
|
|
||||||
if getName(e) == "BuildStarted":
|
if getName(e) == "BuildStarted":
|
||||||
check_sanity(e)
|
check_sanity(e)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user