diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 10:28:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 17:01:41 +0000 |
commit | 4f22710f9a310412f1de0b4e6905c058ec416f25 (patch) | |
tree | e53623992e997169382f41c70cb1f58f8d5e564c /meta | |
parent | cc0471439aa0085ca87deccf061c5b676ef12388 (diff) | |
download | openembedded-core-4f22710f9a310412f1de0b4e6905c058ec416f25.tar.gz openembedded-core-4f22710f9a310412f1de0b4e6905c058ec416f25.tar.bz2 openembedded-core-4f22710f9a310412f1de0b4e6905c058ec416f25.zip |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sanity.bbclass | 11 |
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): return None +# Check if we're running on WSL (Windows Subsystem for Linux). Its known not to +# work but we should tell the user that upfront. +def check_wsl(d): + with open("/proc/version", "r") as f: + verdata = f.readlines() + for l in verdata: + if "Microsoft" in l: + return "OpenEmbedded doesn't work under WSL at this time, sorry" + return None + # Tar version 1.24 and onwards handle overwriting symlinks correctly # but earlier versions do not; this needs to work properly for sstate def check_tar_version(sanity_data): @@ -625,6 +635,7 @@ def check_sanity_version_change(status, d): status.addresult(check_tar_version(d)) status.addresult(check_git_version(d)) status.addresult(check_perl_modules(d)) + status.addresult(check_wsl(d)) missing = "" |