From patchwork Thu May 24 04:42:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Consolidated, Pull, 27/28] sanity.bbclass: catch an extra exception in check_create_long_filename Date: Thu, 24 May 2012 04:42:30 -0000 From: Saul Wold X-Patchwork-Id: 28577 Message-Id: To: openembedded-core@lists.openembedded.org From: Joshua Lock The call to bb.mkdirhier() in check_create_long_filename() can fail with an OSError, explicitly catch this and report something useful to the user. Signed-off-by: Joshua Lock --- meta/classes/sanity.bbclass | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 25ddfea..ff25834 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -158,6 +158,8 @@ def check_create_long_filename(filepath, pathname): return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname else: return "Failed to create a file in %s: %s.\n" % (pathname, strerror) + except OSError as (errno, strerror): + return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror) return "" def check_connectivity(d):