]> code.ossystems Code Review - openembedded-core.git/commitdiff
binconfig-disabled: try harder to prevent usage of config scripts
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 23 Jan 2015 14:48:17 +0000 (06:48 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Jan 2015 21:23:02 +0000 (21:23 +0000)
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.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/binconfig-disabled.bbclass

index 27f904eb42dc8d6739ced78c479ad62e41c84b5f..4c42ae22e4f401d33c6fcd28a315ad2be5ea0ee1 100644 (file)
@@ -10,6 +10,9 @@ FILES_${PN}-dev += "${bindir}/*-config"
 do_install_append () {
        for x in ${BINCONFIG}; do
                echo "#!/bin/sh" > ${D}$x
+               # Make the disabled script emit invalid parameters for those configure
+               # scripts which call it without checking the return code.
+               echo "echo '--should-not-have-used-$x'" > ${D}$x
                echo "exit 1" >> ${D}$x
        done
 }