]> code.ossystems Code Review - openembedded-core.git/commitdiff
archiver: Fix archive for linked kernel source
authorTom Hochstein <tom.hochstein@nxp.com>
Tue, 3 Apr 2018 13:51:15 +0000 (08:51 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Apr 2018 13:49:00 +0000 (14:49 +0100)
When archiving a kernel, if S is ${WORKDIR}/git, then
${WORKDIR}/git is in fact a soft link into work-shared,
and the archive contains just the soft link. Fix by
archiving the real directory.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archiver.bbclass

index c1076155b7f670a1238a500179a734b070a70b3f..31c9b7eb4b6d4d360f384718ba9064cc324b6ac9 100644 (file)
@@ -277,6 +277,11 @@ def create_tarball(d, srcdir, suffix, ar_outdir):
     if (d.getVar('SRC_URI') == ""):
         return
 
+    # For the kernel archive, srcdir may just be a link to the
+    # work-shared location. Use os.path.realpath to make sure
+    # that we archive the actual directory and not just the link.
+    srcdir = os.path.realpath(srcdir)
+
     bb.utils.mkdirhier(ar_outdir)
     if suffix:
         filename = '%s-%s.tar.gz' % (d.getVar('PF'), suffix)