diff options
author | Ross Burton <ross.burton@intel.com> | 2016-02-16 16:27:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-18 07:39:21 +0000 |
commit | 75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690 (patch) | |
tree | 846c09bbf473b4b9793a78dde0a9391a24ae85e3 | |
parent | 1cbc0400621c23243d96dedf4a226a732f5c87c9 (diff) | |
download | openembedded-core-75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690.tar.gz openembedded-core-75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690.tar.bz2 openembedded-core-75ae572427d9cd3f0b3e9e7d4d0e7a93a4f04690.zip |
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/insane.bbclass | 24 |
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() { configs = [] workdir = d.getVar('WORKDIR', True) - bb.note("Checking autotools environment for common misconfiguration") - for root, dirs, files in os.walk(workdir): - statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \ - os.path.join(root,"config.log") - if "config.log" in files: - if subprocess.call(statement, shell=True) == 0: - bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. + + if bb.data.inherits_class('autotools', d): + bb.note("Checking autotools environment for common misconfiguration") + for root, dirs, files in os.walk(workdir): + statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \ + os.path.join(root,"config.log") + if "config.log" in files: + if subprocess.call(statement, shell=True) == 0: + bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this.""") - if "configure.ac" in files: - configs.append(os.path.join(root,"configure.ac")) - if "configure.in" in files: - configs.append(os.path.join(root, "configure.in")) + if "configure.ac" in files: + configs.append(os.path.join(root,"configure.ac")) + if "configure.in" in files: + configs.append(os.path.join(root, "configure.in")) ########################################################################### # Check gettext configuration and dependencies are correct |