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>
This commit is contained in:
parent
2e1cb79170
commit
2471296e25
|
@ -23,8 +23,8 @@ python __anonymous() {
|
||||||
haspng = False
|
haspng = False
|
||||||
for uri in splashfiles:
|
for uri in splashfiles:
|
||||||
fetcher = bb.fetch2.Fetch([uri], d)
|
fetcher = bb.fetch2.Fetch([uri], d)
|
||||||
flocal = fetcher.localpath(uri)
|
flocal = os.path.basename(fetcher.localpath(uri))
|
||||||
fbase = os.path.splitext(os.path.basename(flocal))[0]
|
fbase = os.path.splitext(flocal)[0]
|
||||||
outsuffix = fetcher.ud[uri].parm.get("outsuffix")
|
outsuffix = fetcher.ud[uri].parm.get("outsuffix")
|
||||||
if not outsuffix:
|
if not outsuffix:
|
||||||
if fbase.startswith("psplash-"):
|
if fbase.startswith("psplash-"):
|
||||||
|
@ -74,18 +74,19 @@ python do_compile () {
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
# Build a separate executable for each splash image
|
# Build a separate executable for each splash image
|
||||||
|
workdir = d.getVar('WORKDIR', True)
|
||||||
convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
|
convertscript = "%s/make-image-header.sh" % d.getVar('S', True)
|
||||||
destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
|
destfile = "%s/psplash-poky-img.h" % d.getVar('S', True)
|
||||||
localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
|
localfiles = d.getVar('SPLASH_LOCALPATHS', True).split()
|
||||||
outputfiles = d.getVar('SPLASH_INSTALL', True).split()
|
outputfiles = d.getVar('SPLASH_INSTALL', True).split()
|
||||||
for localfile, outputfile in zip(localfiles, outputfiles):
|
for localfile, outputfile in zip(localfiles, outputfiles):
|
||||||
if localfile.endswith(".png"):
|
if localfile.endswith(".png"):
|
||||||
outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, localfile))
|
outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))
|
||||||
print(outp[1])
|
print(outp[1])
|
||||||
fbase = os.path.splitext(os.path.basename(localfile))[0]
|
fbase = os.path.splitext(localfile)[0]
|
||||||
shutil.copyfile("%s-img.h" % fbase, destfile)
|
shutil.copyfile("%s-img.h" % fbase, destfile)
|
||||||
else:
|
else:
|
||||||
shutil.copyfile(localfile, destfile)
|
shutil.copyfile(os.path.join(workdir, localfile), destfile)
|
||||||
# For some reason just updating the header is not enough, we have to touch the .c
|
# For some reason just updating the header is not enough, we have to touch the .c
|
||||||
# file in order to get it to rebuild
|
# file in order to get it to rebuild
|
||||||
os.utime("%s/psplash.c" % d.getVar('S', True), None)
|
os.utime("%s/psplash.c" % d.getVar('S', True), None)
|
||||||
|
|
Loading…
Reference in New Issue