diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-27 15:46:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-30 22:11:57 +0100 |
commit | 2471296e2508c8f6b047216b1e8e2e188ad3f822 (patch) | |
tree | d5d025cc80021b93a65d6638dc05ba8289a4eafa /meta/recipes-core/psplash | |
parent | 2e1cb7917056558324143634a5dd479e70d10d55 (diff) | |
download | poky-2471296e2508c8f6b047216b1e8e2e188ad3f822.tar.gz |
psplash: copy image files from workdir instead of next to recipe
During parsing this recipe builds up a list of splash image files,
however it was recording full paths to local files (i.e. the files next
to the recipe) and then in do_compile it was pointing to those instead
of the fetched files in WORKDIR. Fix it to use the fetched files which
has the added benefit of the do_compile signature not changing if the
recipe is moved around.
Fixes [YOCTO #5250].
(From OE-Core rev: f1850f9835651baee8d3a0858d00a5d22efcab19)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/psplash')
-rw-r--r-- | meta/recipes-core/psplash/psplash_git.bb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 5122d38a29..1cab2962b2 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb | |||
@@ -23,8 +23,8 @@ python __anonymous() { | |||
23 | haspng = False | 23 | haspng = False |
24 | for uri in splashfiles: | 24 | for uri in splashfiles: |
25 | fetcher = bb.fetch2.Fetch([uri], d) | 25 | fetcher = bb.fetch2.Fetch([uri], d) |
26 | flocal = fetcher.localpath(uri) | 26 | flocal = os.path.basename(fetcher.localpath(uri)) |
27 | fbase = os.path.splitext(os.path.basename(flocal))[0] | 27 | fbase = os.path.splitext(flocal)[0] |
28 | outsuffix = fetcher.ud[uri].parm.get("outsuffix") | 28 | outsuffix = fetcher.ud[uri].parm.get("outsuffix") |
29 | if not outsuffix: | 29 | if not outsuffix: |
30 | if fbase.startswith("psplash-"): | 30 | if fbase.startswith("psplash-"): |
@@ -74,18 +74,19 @@ python do_compile () { | |||
74 | import shutil | 74 | import shutil |
75 | 75 | ||
76 | # Build a separate executable for each splash image | 76 | # Build a separate executable for each splash image |
77 | workdir = d.getVar('WORKDIR', True) | ||
77 | convertscript = "%s/make-image-header.sh" % d.getVar('S', True) | 78 | convertscript = "%s/make-image-header.sh" % d.getVar('S', True) |
78 | destfile = "%s/psplash-poky-img.h" % d.getVar('S', True) | 79 | destfile = "%s/psplash-poky-img.h" % d.getVar('S', True) |
79 | localfiles = d.getVar('SPLASH_LOCALPATHS', True).split() | 80 | localfiles = d.getVar('SPLASH_LOCALPATHS', True).split() |
80 | outputfiles = d.getVar('SPLASH_INSTALL', True).split() | 81 | outputfiles = d.getVar('SPLASH_INSTALL', True).split() |
81 | for localfile, outputfile in zip(localfiles, outputfiles): | 82 | for localfile, outputfile in zip(localfiles, outputfiles): |
82 | if localfile.endswith(".png"): | 83 | if localfile.endswith(".png"): |
83 | outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, localfile)) | 84 | outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile))) |
84 | print(outp[1]) | 85 | print(outp[1]) |
85 | fbase = os.path.splitext(os.path.basename(localfile))[0] | 86 | fbase = os.path.splitext(localfile)[0] |
86 | shutil.copyfile("%s-img.h" % fbase, destfile) | 87 | shutil.copyfile("%s-img.h" % fbase, destfile) |
87 | else: | 88 | else: |
88 | shutil.copyfile(localfile, destfile) | 89 | shutil.copyfile(os.path.join(workdir, localfile), destfile) |
89 | # For some reason just updating the header is not enough, we have to touch the .c | 90 | # For some reason just updating the header is not enough, we have to touch the .c |
90 | # file in order to get it to rebuild | 91 | # file in order to get it to rebuild |
91 | os.utime("%s/psplash.c" % d.getVar('S', True), None) | 92 | os.utime("%s/psplash.c" % d.getVar('S', True), None) |