summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2018-04-03 08:51:15 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-05 14:49:00 +0100
commit564204dd6b73697ef4b6c17243067892876cc323 (patch)
tree3fa66ab33da4e209dbaa2bf3c5c1ec08de8e8994
parentb8c5680a67888d43540366a40bd0c501e926ac31 (diff)
downloadopenembedded-core-564204dd6b73697ef4b6c17243067892876cc323.tar.gz
archiver: Fix archive for linked kernel source
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>
-rw-r--r--meta/classes/archiver.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index c1076155b7..31c9b7eb4b 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -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)