All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seebach <peter.seebach@windriver.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Protection against ever-more-talented fools...
Date: Wed, 9 May 2012 14:20:07 -0500	[thread overview]
Message-ID: <20120509142007.528ca609@wrlaptop> (raw)

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.



             reply	other threads:[~2012-05-09 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 19:20 Peter Seebach [this message]
2012-05-09 19:49 ` Protection against ever-more-talented fools Richard Purdie
2012-05-09 20:07   ` Peter Seebach

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=20120509142007.528ca609@wrlaptop \
    --to=peter.seebach@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.