summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-16 16:27:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-18 07:39:30 +0000
commitf770a6e0c2e1d687abab6f2bf79091b1068d1ccb (patch)
treeb02ce1d27b857476232b7edcfdf5a0c6d4496f59 /meta
parent35011d9ac609672bd388e7e1679d6e6520f0b7c8 (diff)
downloadpoky-f770a6e0c2e1d687abab6f2bf79091b1068d1ccb.tar.gz
insane: wrap autotools checks in inherits_class(autotools) checks
There's no point doing the autotools sanity checks if a recipe didn't inherit autotools, so check the inherits before doing the checks. Also pass -F (fixed strings) and -q (quiet) to grep. (From OE-Core rev: 75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/insane.bbclass24
1 files changed, 13 insertions, 11 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index aef08fe28e..241ad0850b 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1148,19 +1148,21 @@ python do_qa_configure() {
1148 1148
1149 configs = [] 1149 configs = []
1150 workdir = d.getVar('WORKDIR', True) 1150 workdir = d.getVar('WORKDIR', True)
1151 bb.note("Checking autotools environment for common misconfiguration") 1151
1152 for root, dirs, files in os.walk(workdir): 1152 if bb.data.inherits_class('autotools', d):
1153 statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \ 1153 bb.note("Checking autotools environment for common misconfiguration")
1154 os.path.join(root,"config.log") 1154 for root, dirs, files in os.walk(workdir):
1155 if "config.log" in files: 1155 statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \
1156 if subprocess.call(statement, shell=True) == 0: 1156 os.path.join(root,"config.log")
1157 bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. 1157 if "config.log" in files:
1158 if subprocess.call(statement, shell=True) == 0:
1159 bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
1158Rerun configure task after fixing this.""") 1160Rerun configure task after fixing this.""")
1159 1161
1160 if "configure.ac" in files: 1162 if "configure.ac" in files:
1161 configs.append(os.path.join(root,"configure.ac")) 1163 configs.append(os.path.join(root,"configure.ac"))
1162 if "configure.in" in files: 1164 if "configure.in" in files:
1163 configs.append(os.path.join(root, "configure.in")) 1165 configs.append(os.path.join(root, "configure.in"))
1164 1166
1165 ########################################################################### 1167 ###########################################################################
1166 # Check gettext configuration and dependencies are correct 1168 # Check gettext configuration and dependencies are correct