Normalize path (norm_path()) returned by os.path.commonprefix()
to strip trailing slash and prevent false negatives.

Add bb.note() on error to indicate which paths failed.

Signed-off-by: Haris Okanovic <[email protected]>
---
 meta/classes/populate_sdk_base.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/populate_sdk_base.bbclass 
b/meta/classes/populate_sdk_base.bbclass
index aae6786e58..7bfaa33ac5 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -195,7 +195,9 @@ python check_sdk_sysroots() {
             targetPath = os.path.join(linkDirPath, targetPath)
         targetPath = norm_path(targetPath)
 
-        if SCAN_ROOT != os.path.commonprefix( [SCAN_ROOT, targetPath] ):
+        targetCommonPrefix = norm_path(os.path.commonprefix( [SCAN_ROOT, 
targetPath] ))
+        if SCAN_ROOT != targetCommonPrefix:
+            bb.note("'{0!s}' != '{1!s}'".format(SCAN_ROOT, targetCommonPrefix))
             bb.error("Escaping symlink {0!s} --> {1!s}".format(linkPath, 
targetPath))
             return
 
-- 
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to