Skip to contentSkip to conversation

sstate.bbclass: fix sstate_hardcode_path()

PATCH New Robert Yang 1 participant 2 messages Sep 12, 2014

lore
Share & tools
lore
#0 lore raw

cover sstate.bbclass: fix sstate_hardcode_path()

The following changes since commit 10df0718d6a626d99beb68cde8d914ee0820d7eb:

classes/populate_sdk_base: enable adding custom commands to SDK install script (2014-09-11 17:44:40 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/ssgrep
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/ssgrep

Robert Yang (1):
sstate.bbclass: fix sstate_hardcode_path()

 meta/classes/sstate.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 sstate.bbclass: fix sstate_hardcode_path()

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.

---
 meta/classes/sstate.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sstate.bbclass +1 -1
index 67e0c1d..6a02891 100644
@@ -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)
Signature · 1 line
1.7.9.5