[OE-core] [PATCH 1/1] oe-buildenv-internal: Correct the sed expression which updates $PATH

Peter Kjellerstedt peter.kjellerstedt at axis.com
Mon Mar 21 11:41:46 UTC 2016


Without this, the code that adds paths to $PATH could cause it to end
up with a trailing : which would then cause an error from the sanity
checker.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
---
 scripts/oe-buildenv-internal | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index bc6a4fe..8eee008 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -99,7 +99,7 @@ fi
 # Make sure our paths are at the beginning of $PATH
 for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
     # Remove any existences of $newpath from $PATH
-    PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\1#g;s#^:##")
+    PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##")
 
     # Add $newpath to $PATH
     PATH="$newpath:$PATH"
-- 
2.1.0




More information about the Openembedded-core mailing list