From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [master][dizzy][PATCH 1/2] binconfig-disabled: try harder to prevent usage of config scripts
Date: Fri, 23 Jan 2015 06:48:17 -0800 [thread overview]
Message-ID: <1422024498-18778-2-git-send-email-patrick.ohly@intel.com> (raw)
In-Reply-To: <1422024498-18778-1-git-send-email-patrick.ohly@intel.com>
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>
---
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
}
--
1.8.4.5
next prev parent reply other threads:[~2015-01-23 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-23 14:48 [master][dizzy][PATCH 0/2] swig + pcre-config Patrick Ohly
2015-01-23 14:48 ` Patrick Ohly [this message]
2015-01-23 14:48 ` [master][dizzy][PATCH 2/2] binconfig-disabled: install config scripts in sysroot Patrick Ohly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422024498-18778-2-git-send-email-patrick.ohly@intel.com \
--to=patrick.ohly@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox