[OE-core] Protection against ever-more-talented fools...
Peter Seebach
peter.seebach at windriver.com
Wed May 9 19:20:07 UTC 2012
Time for some shell trivia!
Trivia point: PATH=:/usr/bin and PATH=.:/usr/bin are equivalent.
Trivia point: So are PATH=/bin::/usr/bin and PATH=/bin:.:/usr/bin
Trivia point: People love to write stuff like:
PATH=$(THAT_DIRECTORY):$PATH
Trivia point: The shell expands undefined variables to empty strings.
Which is to say:
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 687ddeb..1384592 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -298,8 +298,9 @@ def check_sanity(e):
if not check_app_exists("qemu-arm", e.data):
messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
- if "." in data.getVar('PATH', e.data, True).split(":"):
- messages = messages + "PATH contains '.' which will break the build, please remove this"
+ paths = data.getVar('PATH', e.data, True).split(":")
+ if "." in paths or "" in paths:
+ messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
if data.getVar('TARGET_ARCH', e.data, True) == "arm":
# This path is no longer user-readable in modern (very recent) Linux
--
Listen, get this. Nobody with a good compiler needs to be justified.
More information about the Openembedded-core
mailing list