[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6737/8267] classes/sanity: check for case-sensitive file systems
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6737/8267] classes/sanity: check for case-sensitive file systems
- Date: Sun, 17 Dec 2017 05:15:53 +0000 (UTC)
commit 6e46b4c1b26c7cfca2d169f23a299233eb80b0d2
Author: Ross Burton <ross burton intel com>
Date: Wed Jul 12 20:32:26 2017 +0100
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>
meta/classes/sanity.bbclass | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b746b17..5699287 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -350,6 +350,14 @@ def check_not_nfs(path, name):
return "The %s: %s can't be located on nfs.\n" % (name, path)
return ""
+# Check that the path is on a case-sensitive file system
+def check_case_sensitive(path, name):
+ import tempfile
+ with tempfile.NamedTemporaryFile(prefix='TmP', dir=path) as tmp_file:
+ if os.path.exists(tmp_file.name.lower()):
+ return "The %s (%s) can't be on a case-insensitive file system.\n" % (name, path)
+ return ""
+
# Check that path isn't a broken symlink
def check_symlink(lnk, data):
if os.path.islink(lnk) and not os.path.exists(lnk):
@@ -672,6 +680,10 @@ def check_sanity_version_change(status, d):
# Check that TMPDIR isn't located on nfs
status.addresult(check_not_nfs(tmpdir, "TMPDIR"))
+ # Check for case-insensitive file systems (such as Linux in Docker on
+ # macOS with default HFS+ file system)
+ status.addresult(check_case_sensitive(tmpdir, "TMPDIR"))
+
def sanity_check_locale(d):
"""
Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]