diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-01-23 06:48:17 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-29 15:36:49 +0000 |
commit | 5e6e95d71be1486c58d979ace744656a182feba2 (patch) | |
tree | c390f70c9e2af871c86f1ee0d11515763e4b37e3 /meta/classes | |
parent | 0383bb86589964e19cb391512d6196fb2cdac114 (diff) | |
download | poky-5e6e95d71be1486c58d979ace744656a182feba2.tar.gz |
binconfig-disabled: try harder to prevent usage of config scripts
Returning a non-zero exit code is not enough to cause errors when configure
scripts call the patched config scripts: for example, swig's configure script
uses PCRE_LIBS=`$PCRE_CONFIG --libs` and does not abort on errors. Using empty
output may then succeed, for example when the required library is available
indirectly.
Returning some nonsense command line arguments covers such cases, because
using them will definitely lead to errors during compilation. The faked
arguments were chosen such that these errors can be linked back to the root
cause.
(From OE-Core rev: d1ff61a16a3fcfdd7cf882bc89fb1d164cb1603a)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/binconfig-disabled.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/binconfig-disabled.bbclass b/meta/classes/binconfig-disabled.bbclass index 27f904eb42..4c42ae22e4 100644 --- a/meta/classes/binconfig-disabled.bbclass +++ b/meta/classes/binconfig-disabled.bbclass | |||
@@ -10,6 +10,9 @@ FILES_${PN}-dev += "${bindir}/*-config" | |||
10 | do_install_append () { | 10 | do_install_append () { |
11 | for x in ${BINCONFIG}; do | 11 | for x in ${BINCONFIG}; do |
12 | echo "#!/bin/sh" > ${D}$x | 12 | echo "#!/bin/sh" > ${D}$x |
13 | # Make the disabled script emit invalid parameters for those configure | ||
14 | # scripts which call it without checking the return code. | ||
15 | echo "echo '--should-not-have-used-$x'" > ${D}$x | ||
13 | echo "exit 1" >> ${D}$x | 16 | echo "exit 1" >> ${D}$x |
14 | done | 17 | done |
15 | } | 18 | } |