summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-03-01 23:58:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-03 15:38:08 +0000
commitd4c55e2448053b51eb217c61328a2ca25bec0461 (patch)
treebd1aa8e62eecfa68b78db34976f041f13b134a45
parentc81a204f41bd018964d7ef096087ace5c78365c3 (diff)
downloadopenembedded-core-contrib-d4c55e2448053b51eb217c61328a2ca25bec0461.tar.gz
psplash: improve make-image-header.sh call
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>
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 3ad1ef4815..3161a5e3f1 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -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