]> code.ossystems Code Review - openembedded-core.git/commitdiff
package.bbclass: quote pathname given to objdump
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Thu, 12 Jan 2012 16:30:20 +0000 (17:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Jan 2012 14:53:01 +0000 (14:53 +0000)
Packaging will fail with executable files containing spaces in their
names. Patch quotes the parameter passed to 'objdump'.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
meta/classes/package.bbclass

index f8f0a12dc163ad1656d0cbb8725906fbb9bbfef2..108847094e4b96c029b21c43f429c7ed5556115d 100644 (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()