1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR

When determining the path from WORKDIR to the extracted sources, we're using
S, but if S is in work-shared, that's problematic and won't give us good
results, so assume 'git' for that case, warning when appropriate.

(From OE-Core rev: dc70cf470f18c97b6762cbf7aca723769b47bc7d)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson
2015-07-16 16:23:03 -07:00
committed by Richard Purdie
parent 5c080f71bf
commit c56cb31565
+4
View File
@@ -356,6 +356,10 @@ def appendsrc(args, files, rd):
for newfile, srcfile in files.iteritems():
src_destdir = os.path.dirname(srcfile)
if not args.use_workdir:
if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True):
srcdir = os.path.join(workdir, 'git')
if not bb.data.inherits_class('kernel-yocto', rd):
logger.warn('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git')
src_destdir = os.path.join(os.path.relpath(srcdir, workdir), src_destdir)
src_destdir = os.path.normpath(src_destdir)