[oe-commits] Patrick Ohly : binconfig-disabled: try harder to prevent usage of config scripts

git at git.openembedded.org git at git.openembedded.org
Thu Jan 29 15:37:10 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: d1ff61a16a3fcfdd7cf882bc89fb1d164cb1603a
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d1ff61a16a3fcfdd7cf882bc89fb1d164cb1603a

Author: Patrick Ohly <patrick.ohly at intel.com>
Date:   Fri Jan 23 06:48:17 2015 -0800

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.

Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/classes/binconfig-disabled.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/binconfig-disabled.bbclass b/meta/classes/binconfig-disabled.bbclass
index 27f904e..4c42ae2 100644
--- a/meta/classes/binconfig-disabled.bbclass
+++ b/meta/classes/binconfig-disabled.bbclass
@@ -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
 }



More information about the Openembedded-commits mailing list