summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-12-04 02:31:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-05 15:34:07 +0000
commit381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7 (patch)
tree330264103c52ad1cbc52b193692f99e711b22d1f /meta
parent306761b0261c73a046c151740fbd20f6815aeb51 (diff)
downloadpoky-381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7.tar.gz
sstate.bbclass: fix detection of owners matching sstate files
* without this patch: Python 2.7.3 >>> sstate_search_cmd = "grep -rl /OE/jansa-test/shr-core/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi/runtime-reverse/vim-common /OE/jansa-test/shr-core/tmp-eglibc/sstate-control --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" >>> cmd_array = sstate_search_cmd.split(' ') >>> search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0] grep: |: No such file or directory grep: sed: No such file or directory * Adding shell=True and using cmd string instead of array makes it work: >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0] >>> print search_output manifest-armv7a-vfp-neon-gvim.package manifest-armv7a-vfp-neon-vim-tiny.package manifest-armv7a-vfp-neon-vim.package But still isn't 100% reliable, I guess it's caused by some other package being removed from sstate while grep is already running. So sometimes grep can show error on STDERR >>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0] grep: /OE/jansa-test/shr-core/tmp-eglibc/sstate-control/manifest-armv7a-vfp-neon-systemtap.package: No such file or directory (From OE-Core rev: d84f7d7a12b4271f7b2bfde9fb356d750abff15d) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 967ae9b559..832b39e7ee 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -169,8 +169,7 @@ def sstate_install(ss, d):
169 if realmatch: 169 if realmatch:
170 match.append(f) 170 match.append(f)
171 sstate_search_cmd = "grep -rl %s %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}")) 171 sstate_search_cmd = "grep -rl %s %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
172 cmd_array = sstate_search_cmd.split(' ') 172 search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
173 search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
174 if search_output != "": 173 if search_output != "":
175 match.append("Matched in %s" % search_output.rstrip()) 174 match.append("Matched in %s" % search_output.rstrip())
176 if match: 175 if match: