diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 10:28:10 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-05 22:34:00 +0000 |
| commit | f67c02816c91792cc6eccea7d2445b6a2d9cf58b (patch) | |
| tree | 5d9ec0a80cdfbf68aafbdaa6631f5e7681a287f5 | |
| parent | 52ac6715c72df580f5db99fa8450d7e8b907d024 (diff) | |
| download | poky-f67c02816c91792cc6eccea7d2445b6a2d9cf58b.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: 4f22710f9a310412f1de0b4e6905c058ec416f25)
(From OE-Core rev: 33a577864123833d7d8182fe90df7069fc583bc6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -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): | |||
| 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. | ||
| 516 | def 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 |
| 516 | def check_tar_version(sanity_data): | 526 | def 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 | ||
