summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-11-16 14:20:49 +0000
committerRichard Purdie <richard@openedhand.com>2006-11-16 14:20:49 +0000
commit5962332b14515914dbe485892cd0d849e3b8543b (patch)
treeca7964fbb10390679a21872fbb9337e50ef3c7bc /meta
parent24d8eaa443df74a5d2eaf78d2c10039c539e827b (diff)
downloadpoky-5962332b14515914dbe485892cd0d849e3b8543b.tar.gz
sanity.bbclass: Merge with OE syncing improvements both ways
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@855 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass41
1 files changed, 17 insertions, 24 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 1c96ad6d83..58f424c6e8 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -49,29 +49,31 @@ def check_sanity(e):
49 print "Foo %s" % minversion 49 print "Foo %s" % minversion
50 return 50 return
51 51
52 messages = ""
53
52 if (LooseVersion(__version__) < LooseVersion(minversion)): 54 if (LooseVersion(__version__) < LooseVersion(minversion)):
53 raise_sanity_error('Bitbake version %s is required and version %s was found' % (minversion, __version__)) 55 messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
54 56
55 # Check TARGET_ARCH is set 57 # Check TARGET_ARCH is set
56 if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID': 58 if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID':
57 raise_sanity_error('Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.') 59 messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n'
58 60
59 # Check TARGET_OS is set 61 # Check TARGET_OS is set
60 if data.getVar('TARGET_OS', e.data, True) == 'INVALID': 62 if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
61 raise_sanity_error('Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.') 63 messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
62 64
63 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf 65 # Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
64 if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split(): 66 if "diffstat-native" not in data.getVar('ASSUME_PROVIDED', e.data, True).split():
65 raise_sanity_error('Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf') 67 messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
66 68
67 # Check that the MACHINE is valid 69 # Check that the MACHINE is valid
68 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data): 70 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
69 raise_sanity_error('Please set a valid MACHINE in your local.conf') 71 messages = messages + 'Please set a valid MACHINE in your local.conf\n'
70 72
71 # Check that the DISTRO is valid 73 # Check that the DISTRO is valid
72 # need to take into account DISTRO renaming DISTRO 74 # need to take into account DISTRO renaming DISTRO
73 if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ): 75 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 )) 76 messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
75 77
76 missing = "" 78 missing = ""
77 79
@@ -84,23 +86,11 @@ def check_sanity(e):
84 if not check_app_exists('${BUILD_PREFIX}g++', e.data): 86 if not check_app_exists('${BUILD_PREFIX}g++', e.data):
85 missing = missing + "C++ Compiler," 87 missing = missing + "C++ Compiler,"
86 88
87 if not check_app_exists('gawk', e.data): 89 required_utilities = "patch diffstat texi2html cvs svn bzip2 tar gzip gawk"
88 missing = missing + "GNU awk (gawk),"
89
90 if not check_app_exists('patch', e.data):
91 missing = missing + "GNU patch,"
92
93 if not check_app_exists('diffstat', e.data):
94 missing = missing + "diffstat,"
95 90
96 if not check_app_exists('texi2html', e.data): 91 for util in required_utilities.split():
97 missing = missing + "texi2html," 92 if not check_app_exists( util, e.data ):
98 93 missing = missing + "%s," % util
99 if not check_app_exists('cvs', e.data):
100 missing = missing + "cvs,"
101
102 if not check_app_exists('svn', e.data):
103 missing = missing + "svn,"
104 94
105 # qemu-native needs gcc 3.x 95 # qemu-native needs gcc 3.x
106 96
@@ -112,9 +102,12 @@ def check_sanity(e):
112 # FIXME: We also need to check for libsdl-dev and zlib-dev 102 # FIXME: We also need to check for libsdl-dev and zlib-dev
113 # for qemu-native... 103 # for qemu-native...
114 104
115 if not missing == "": 105 if missing != "":
116 missing = missing.rstrip(',') 106 missing = missing.rstrip(',')
117 raise_sanity_error("Missing Dependencies: %s" % missing) 107 messages = messages + "Please install following missing utilities: %s\n" % missing
108
109 if messages != "":
110 raise_sanity_error(messages)
118 111
119 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) 112 oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
120 if not oes_bb_conf: 113 if not oes_bb_conf: