package.bbclass: quote pathname given to objdump

Packaging will fail with executable files containing spaces in their
names. Patch quotes the parameter passed to 'objdump'.

(From OE-Core rev: 7f7db286ca0b70bd5cce643c3b84f77ad45cc786)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Enrico Scholz
2012-01-12 17:30:20 +01:00
committed by Richard Purdie
parent f20d49315d
commit 866ed43c12

View File

@@ -1205,7 +1205,7 @@ SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
SHLIBSWORKDIR = "${WORKDIR}/shlibs"
python package_do_shlibs() {
import re
import re, pipes
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
if exclude_shlibs:
@@ -1234,7 +1234,7 @@ python package_do_shlibs() {
lf = bb.utils.lockfile(bb.data.expand("${PACKAGELOCK}", d))
def linux_so(root, path, file):
cmd = d.getVar('OBJDUMP', True) + " -p " + os.path.join(root, file) + " 2>/dev/null"
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
fd = os.popen(cmd)
lines = fd.readlines()