summaryrefslogtreecommitdiffstats
path: root/support/dependencies
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2017-05-20 10:20:05 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-06-08 21:40:32 +0200
commitf00d6ec67bd6fed6ff8fd322d60d026ec87d8a6e (patch)
treeb8602f30d7784f94e9eec29f7fa9bddc82f8e13b /support/dependencies
parent4cb4ab5cf99fe0b3a067fc89104f94c2d382da02 (diff)
downloadbuildroot-f00d6ec67bd6fed6ff8fd322d60d026ec87d8a6e.tar.gz
buildroot-f00d6ec67bd6fed6ff8fd322d60d026ec87d8a6e.zip
support/dependencies: check PATH does not carry a \n
... otherwise it fails spectacularly as soon as PATH is referenced in a package rule (i.e. very soon, fortunately): >>> host-lzip 1.18 Downloading /bin/bash: -c: line 0: unexpected EOF while looking for matching `"' /bin/bash: -c: line 1: syntax error: unexpected end of file Fixes # 9886. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ciro Santilli <ciro.santilli@gmail.com> [Thomas: fix typo in message, use tabs for indentation.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support/dependencies')
-rwxr-xr-xsupport/dependencies/dependencies.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 168d1960a1..a195c62c8c 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -29,6 +29,18 @@ if test -n "$LD_LIBRARY_PATH" ; then
fi
fi;
+# PATH should not contain a newline, otherwise it fails in spectacular ways
+# as soon as PATH is referenced in a package rule
+case "${PATH}" in
+(*"
+"*) printf "\n"
+ # Break the '\n' sequence, or a \n is printed (which is not what we want).
+ printf "Your PATH contains a newline (%sn) character.\n" "\\"
+ printf "This doesn't work. Fix you PATH.\n"
+ exit 1
+ ;;
+esac
+
# sanity check for CWD in PATH. Having the current working directory
# in the PATH makes the toolchain build process break.
# try not to rely on egrep..
OpenPOWER on IntegriCloud