]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
archiver.bbclass: Fix work-shared checking for kernel recipes
authorBenjamin Szőke <egyszeregy@freemail.hu>
Fri, 14 Jun 2024 07:37:29 +0000 (09:37 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 18 Jun 2024 07:41:55 +0000 (08:41 +0100)
Source dir can be a symbolic link in some BSP's linux kernel recipe
which points to work-shared path (like linux-fslc in meta-freescale).
Change to use os.path.realpath() in order to get real path of
source dir.

Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/archiver.bbclass

index 2d0bbfbd4228265e7b103d14d04a83da76973285..9d286224d629725a122cfc04ef9efcc34324e30a 100644 (file)
@@ -473,7 +473,8 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
 
 def is_work_shared(d):
     sharedworkdir = os.path.join(d.getVar('TMPDIR'), 'work-shared')
-    return d.getVar('S').startswith(sharedworkdir)
+    sourcedir = os.path.realpath(d.getVar('S'))
+    return sourcedir.startswith(sharedworkdir)
 
 # Run do_unpack and do_patch
 python do_unpack_and_patch() {