summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-07-12 20:32:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-17 14:01:37 +0100
commit6e46b4c1b26c7cfca2d169f23a299233eb80b0d2 (patch)
treec53b2a8cb8687f17e8380fa1e09e0fc5eaf8a5a0 /meta
parent173760abc66580e21b36eac3a591847e0d3e91f4 (diff)
downloadpoky-6e46b4c1b26c7cfca2d169f23a299233eb80b0d2.tar.gz
classes/sanity: check for case-sensitive file systems
Case-insensitive file systems fail during builds in very mysterious ways, such as mpfr: ERROR: patch_do_patch: Not a directory The problem here being that mpfr has a PATCHES file, so when we try to copy the patches into ${S}/patches/ it fails. We can't and won't support case-insensitive file systems so add a sanity check to abort the build if one is found. (From OE-Core rev: 20ce04fb64f559e64490d53678fa00644a92894a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b746b173b7..5699287a4a 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -350,6 +350,14 @@ def check_not_nfs(path, name):
350 return "The %s: %s can't be located on nfs.\n" % (name, path) 350 return "The %s: %s can't be located on nfs.\n" % (name, path)
351 return "" 351 return ""
352 352
353# Check that the path is on a case-sensitive file system
354def check_case_sensitive(path, name):
355 import tempfile
356 with tempfile.NamedTemporaryFile(prefix='TmP', dir=path) as tmp_file:
357 if os.path.exists(tmp_file.name.lower()):
358 return "The %s (%s) can't be on a case-insensitive file system.\n" % (name, path)
359 return ""
360
353# Check that path isn't a broken symlink 361# Check that path isn't a broken symlink
354def check_symlink(lnk, data): 362def check_symlink(lnk, data):
355 if os.path.islink(lnk) and not os.path.exists(lnk): 363 if os.path.islink(lnk) and not os.path.exists(lnk):
@@ -672,6 +680,10 @@ def check_sanity_version_change(status, d):
672 # Check that TMPDIR isn't located on nfs 680 # Check that TMPDIR isn't located on nfs
673 status.addresult(check_not_nfs(tmpdir, "TMPDIR")) 681 status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
674 682
683 # Check for case-insensitive file systems (such as Linux in Docker on
684 # macOS with default HFS+ file system)
685 status.addresult(check_case_sensitive(tmpdir, "TMPDIR"))
686
675def sanity_check_locale(d): 687def sanity_check_locale(d):
676 """ 688 """
677 Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists. 689 Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.