]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: Enclose sstate search parameter with quotes
authorLeonardo Sandoval <leonardo.sandoval@freescale.com>
Mon, 4 Mar 2013 23:45:10 +0000 (17:45 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Mar 2013 13:27:49 +0000 (13:27 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index ee925cd7a03b6f1985e1cbae9e7f1d5b920ddc20..ce9f243445efa882dc654c37d1dedbb0c40672d0 100644 (file)
@@ -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())