Patchwork sstate.bbclass: Enclose sstate search parameter with quotes

login
register
mail settings
Submitter Leonardo Sandoval
Date March 4, 2013, 11:45 p.m.
Message ID <1362440710-5636-1-git-send-email-leonardo.sandoval@freescale.com>
Download mbox | patch
Permalink /patch/45497/
State Accepted
Commit 66ed85a0c91a799cace69e11c26780da944ba448
Headers show

Comments

Leonardo Sandoval - March 4, 2013, 11:45 p.m.
In case filenames have spaces, execution of the function
sstater_install will hang, so the print parameter %s must be
enclosed with quotes.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@freescale.com>
---
 meta/classes/sstate.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Otavio Salvador - March 5, 2013, 11:08 a.m.
On Mon, Mar 4, 2013 at 8:45 PM, Leonardo Sandoval
<leonardo.sandoval@freescale.com> wrote:
> In case filenames have spaces, execution of the function
> sstater_install will hang, so the print parameter %s must be
> enclosed with quotes.
>
> Signed-off-by: Leonardo Sandoval <leonardo.sandoval@freescale.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

Patch

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 118a28a..6232aa2 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -174,7 +174,7 @@  def sstate_install(ss, d):
                     break
             if realmatch:
                 match.append(f)
-                sstate_search_cmd = "grep -rl %s %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
+                sstate_search_cmd = "grep -rl '%s' %s --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'" % (f, d.expand("${SSTATE_MANIFESTS}"))
                 search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
                 if search_output != "":
                     match.append("Matched in %s" % search_output.rstrip())