From 065fc2dc8d76a3746b8bf85869d1a19470cc7b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 3 Dec 2014 15:18:25 +0100 Subject: [PATCH] cmake-lib.bbclass: fix crash in case no cmake files were installed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- classes/cmake-lib.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/cmake-lib.bbclass b/classes/cmake-lib.bbclass index 3e19c5a3..b0ecec67 100644 --- a/classes/cmake-lib.bbclass +++ b/classes/cmake-lib.bbclass @@ -88,7 +88,8 @@ python do_populate_sysroot_append() { bb.fatal("Parameter %s is too short for CMAKE_HIDE_ERROR[%s] in %s" % (param, flag, pn)) # first check if cmake files were installed to sysroot - if os.path.getsize(d.getVar('CMAKEINSTALLED', True)) == 0: + tmpfile = d.getVar('CMAKEINSTALLED', True) + if (not os.path.isfile(tmpfile)) or os.path.getsize(tmpfile) == 0: bb.warn("There were no cmake files installed by %s" % pn) else: # parse CMAKE_HIDE_ERROR[..]