[OE-core] [PATCH] populate_sdk_base/check_sdk_sysroots(): Normalize os.path.commonprefix()
Haris Okanovic
haris.okanovic at ni.com
Tue Jul 10 17:57:00 UTC 2018
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 <haris.okanovic at ni.com>
---
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
More information about the Openembedded-core
mailing list