From: Joshua Lock Date: Wed, 23 May 2012 23:28:59 +0000 (-0700) Subject: sanity.bbclass: catch an extra exception in check_create_long_filename X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9509ed472a75d5696af7ecb8bf8a6acf5fc761f1;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git sanity.bbclass: catch an extra exception in check_create_long_filename 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. (From OE-Core rev: b066906477eb0496a2babb3d8e87682a1b7df0de) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 25ddfeabb2e..ff258349b53 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):