summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-16 10:28:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-16 11:46:07 +0000
commit9c55d8d8fee34bb270ee6dc272c55e78beae1624 (patch)
tree3c69e7e89b2a9ac373ff80a852752fdf2f9afa63 /meta/classes/sanity.bbclass
parentfabffda42ebb6ce4ccc21c9292bf148acd421bc9 (diff)
downloadpoky-9c55d8d8fee34bb270ee6dc272c55e78beae1624.tar.gz
sanity: Add check for WSL
Users are starting to expect OE to work under WSL which it doesn't. Add a warning to tell them about this up front and manage expectations. (From OE-Core rev: 62fe04c2451f612b9ee5eba469c7724b63484499) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4e8eae8946..374dacf4d0 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -511,6 +511,16 @@ def check_make_version(sanity_data):
511 return None 511 return None
512 512
513 513
514# Check if we're running on WSL (Windows Subsystem for Linux). Its known not to
515# work but we should tell the user that upfront.
516def check_wsl(d):
517 with open("/proc/version", "r") as f:
518 verdata = f.readlines()
519 for l in verdata:
520 if "Microsoft" in l:
521 return "OpenEmbedded doesn't work under WSL at this time, sorry"
522 return None
523
514# Tar version 1.24 and onwards handle overwriting symlinks correctly 524# Tar version 1.24 and onwards handle overwriting symlinks correctly
515# but earlier versions do not; this needs to work properly for sstate 525# but earlier versions do not; this needs to work properly for sstate
516def check_tar_version(sanity_data): 526def check_tar_version(sanity_data):
@@ -625,6 +635,7 @@ def check_sanity_version_change(status, d):
625 status.addresult(check_tar_version(d)) 635 status.addresult(check_tar_version(d))
626 status.addresult(check_git_version(d)) 636 status.addresult(check_git_version(d))
627 status.addresult(check_perl_modules(d)) 637 status.addresult(check_perl_modules(d))
638 status.addresult(check_wsl(d))
628 639
629 missing = "" 640 missing = ""
630 641