]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIR
authorChristopher Larson <chris_larson@mentor.com>
Thu, 16 Jul 2015 23:23:03 +0000 (16:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jul 2015 22:25:02 +0000 (23:25 +0100)
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.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/append.py

index ed4af2054ab1d11b479c4f0bed3f47e05f2ecfcb..3f2f9a4f4f0e4341dfb7dc0f685710fed63e9c3b 100644 (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)