glib-2.0: show an error about --cross-file only when such file exists

(From OE-Core rev: 6bd44129a76bdae1320f76035b23568a9c2b4e57)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Martin Jansa
2021-03-05 22:04:25 +01:00
committed by Richard Purdie
parent 57077fa931
commit 9852a5caf5

View File

@@ -41,7 +41,8 @@ def find_meson_cross_files(d):
filename = os.path.normpath(os.path.join(path, "meson.cross.d", element))
sanitized_path = filename.replace(thisdir, "${THISDIR}")
if sanitized_path == filename:
bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir))
if os.path.exists(filename):
bb.error("Cannot add '%s' to --cross-file, because it's not relative to THISDIR '%s' and sstate signature would contain this full path" % (filename, thisdir))
continue
files[filename.replace(thisdir, "${THISDIR}")] = os.path.exists(filename)