From 52a7bbd5c4875c5f61ea65dda38e495a2925a20d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 3 Nov 2023 11:28:04 +0100 Subject: [PATCH] meta/lib/oe/copy_buildsystem.py: do not derefence symlinks This was added (I think) for the purpose of supporting layers that refer to items outside of the layer via relative symlinks: https://git.yoctoproject.org/poky-contrib/commit/?id=d31d1ad4e566e42d0bbcf1f41ac25e33181fb517 I do not think copying the link target into the layer that references it is the correct solution: rather the original target should be included into the SDK with the same relative path. This change is done for the sake of preserving symlinks that are referencing things inside the layer as they are; particularly the content of scripts/esdk-tools/. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/lib/oe/copy_buildsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index a0d829054e1..81abfbf9e23 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py @@ -22,7 +22,7 @@ def _smart_copy(src, dest): mode = os.stat(src).st_mode if stat.S_ISDIR(mode): bb.utils.mkdirhier(dest) - cmd = "tar --exclude='.git' --exclude='__pycache__' --xattrs --xattrs-include='*' -chf - -C %s -p . \ + cmd = "tar --exclude='.git' --exclude='__pycache__' --xattrs --xattrs-include='*' -cf - -C %s -p . \ | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dest) subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) else: -- 2.47.3