Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: openembedded-core@lists.openembedded.org
Cc: Stefan Agner <stefan.agner@toradex.com>, liu.ming50@gmail.com
Subject: [PATCH] psplash: improve make-image-header.sh call
Date: Fri,  1 Mar 2019 23:58:02 +0100	[thread overview]
Message-ID: <20190301225802.62860-1-stefan@agner.ch> (raw)

From: Stefan Agner <stefan.agner@toradex.com>

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>
---
 meta/recipes-core/psplash/psplash_git.bb | 6 +++---
 1 file 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
-- 
2.13.6



                 reply	other threads:[~2019-03-01 22:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190301225802.62860-1-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=liu.ming50@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=stefan.agner@toradex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox