From 2cba67e74cea054fac371589a1ec820ba9bbfbf6 Mon Sep 17 00:00:00 2001 From: Robert Drab <robert.drab@huawei.com> Date: Fri, 8 Apr 2022 14:09:55 +0200 Subject: [PATCH] Revert "gn_base.bbclass: Make build dir path checking more robust" This reverts commit 82e0bd85d4be288607736ea5b50f0e53f8c6616d. The build directory is created in the do_configure task that is executing GN which relies on the build directory check. The os.path.samefile() raises an exception when os.stat() fails and therefore cannot be used to compare paths of non-existing directories. Signed-off-by: Robert Drab <robert.drab@huawei.com> --- meta-oniro-staging/classes/gn_base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oniro-staging/classes/gn_base.bbclass b/meta-oniro-staging/classes/gn_base.bbclass index 06663207..6f0c945a 100644 --- a/meta-oniro-staging/classes/gn_base.bbclass +++ b/meta-oniro-staging/classes/gn_base.bbclass @@ -52,7 +52,7 @@ EXPORT_FUNCTIONS do_configure do_compile do_install python do_check_B_is_not_S() { bpath = os.path.abspath(d.expand("${B}")) spath = os.path.abspath(d.expand("${S}")) - if os.path.samefile(bpath, spath): + if os.path.abspath(d.expand("${S}")) == os.path.abspath(d.expand("${B}")): bb.fatal(''' GN requires build and sources directories to be different. By default build directory is set to ${WORKDIR}/out. If you're using devtool remember to use -- GitLab