]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
sstate.bbclass: fix sstate_hardcode_path()
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 12 Sep 2014 09:54:18 +0000 (02:54 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Sep 2014 21:12:29 +0000 (22:12 +0100)
The "grep -e (x|y)" doesn't work, for example:
$ echo xy | grep -e '(x|y)'
No output

We can use "grep -E" (extended regexp) or "grep -e x -e y" to fix it.
It only affected the cross recipes.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sstate.bbclass

index 2d8db57c812033e35c6b43d2e9355ec49112e6b2..6f1cfb27d9905a099225fad0d2d0044d1cda9a11 100644 (file)
@@ -418,7 +418,7 @@ python sstate_hardcode_path () {
         sstate_grep_cmd = "grep -l -e '%s'" % (staging)
         sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
     elif bb.data.inherits_class('cross', d):
-        sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging)
+        sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging)
         sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
     else:
         sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)