]> code.ossystems Code Review - openembedded-core.git/commitdiff
psplash: improve make-image-header.sh call
authorStefan Agner <stefan.agner@toradex.com>
Fri, 1 Mar 2019 22:58:02 +0000 (23:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 3 Mar 2019 15:38:08 +0000 (15:38 +0000)
Simplify make-image-header.sh call and make sure it gets called in
the current working directory. Also check the return value of the
function call.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/psplash/psplash_git.bb

index 3ad1ef48157efc9cb562ca70e548cd7c48d819ac..3161a5e3f131481cf863cb5160f6d261e7aa7574 100644 (file)
@@ -74,7 +74,6 @@ ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
 python do_compile () {
     import shutil
     import subprocess
-    import shlex
 
     # Build a separate executable for each splash image
     workdir = d.getVar('WORKDIR')
@@ -84,9 +83,10 @@ python do_compile () {
     outputfiles = d.getVar('SPLASH_INSTALL').split()
     for localfile, outputfile in zip(localfiles, outputfiles):
         if localfile.endswith(".png"):
-            subprocess.call(shlex.split('%s %s POKY' % (convertscript, os.path.join(workdir, localfile))))
+            if subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir):
+                bb.fatal("Error calling convert script '%s'" % (convertscript))
             fbase = os.path.splitext(localfile)[0]
-            shutil.copyfile("%s-img.h" % fbase, destfile)
+            shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile)
         else:
             shutil.copyfile(os.path.join(workdir, localfile), destfile)
         # For some reason just updating the header is not enough, we have to touch the .c