summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-04-01 15:29:03 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-04-01 15:29:03 +0000
commit90ee3a0561f08ad977d7da9d968bcbd0c7efcd8f (patch)
tree6964d7de7a71459f80b378cfe188730a9e242501
parentfd4c4ad6ecf549b77904bba64a2c0537e00ebe3b (diff)
downloadbuildroot-novena-90ee3a0561f08ad977d7da9d968bcbd0c7efcd8f.tar.gz
buildroot-novena-90ee3a0561f08ad977d7da9d968bcbd0c7efcd8f.zip
pkgconfig: Return appropriate error code from pkgconfig script
Patch by Will Newton. Currently the wrapper script for pkgconfig clobbers the return status of pkgconfig. This is a problem for example when someone tries to run "pkgconfig --exists". This patch should allow the correct return code to be passed through. Note it uses the "pipefail" option that was introduced with bash 3.
-rwxr-xr-xpackage/pkgconfig/pkgconfig-filter.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/pkgconfig/pkgconfig-filter.sh b/package/pkgconfig/pkgconfig-filter.sh
index 770e9317b..f2bd75d8e 100755
--- a/package/pkgconfig/pkgconfig-filter.sh
+++ b/package/pkgconfig/pkgconfig-filter.sh
@@ -2,6 +2,8 @@
# filter the output from pkg-config (renamed as pkg-config.real)
# and ensures PKG_CONFIG_SYSROOT is prepended to all paths
+set -o pipefail
+
CMD=$0
if [ ! "$PKG_CONFIG_SYSROOT" ]; then
@@ -22,6 +24,5 @@ then
#echo "OKAY" >&2;
exit 0;
else
- echo "pkg-config failed!" >&2
exit $?
fi