diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-06-25 23:23:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-26 09:28:53 +0100 |
commit | 48b5ea6782ec7e9ab8f9a28438ef0ededa5fe224 (patch) | |
tree | 3c7288663cb3ea21302f84f9a3a6f0e739d869f4 /meta/classes/sanity.bbclass | |
parent | ad2bd4c1eca6542680bb6d080f24f199a2dd95fb (diff) | |
download | poky-48b5ea6782ec7e9ab8f9a28438ef0ededa5fe224.tar.gz |
sanity.bbclass: check /bin/sh is dash or bash
The build would fail when /bin/sh links to ksh or csh, we only test dash
and bash AFAIK.
* When /bin/sh -> csh:
$ bitbake quilt-native
$ bitbake quilt-native -cfetch
Illegal variable name.
Illegal variable name.
[snip]
uname: extra operand `2'
Try `uname --help' for more information.
* When /bin/sh -> ksh:
If there are only a few tasks running, for example,
"bitbake quilt-native", the build would be OK, but it would fail if we
run "bitbake world" for a while, there would be a lot of "Broken pipe"
errors:
Exception: CalledProcessError: Command
'cd /path/to/xx; find . -type d -print | tar -cf - -C /path/to/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C /path/to/xxx'
returned non-zero exit status 2 with output tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: `standard output': Broken pipe
find: write error
[YOCTO #7917]
(From OE-Core rev: ecdfdd7286a2f406655577f2c4d6fcf3fe3de429)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index d9eff90160..2855941a7b 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -835,6 +835,10 @@ def check_sanity_everybuild(status, d): | |||
835 | if 'vdi' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True): | 835 | if 'vdi' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True): |
836 | status.addresult("Error, IMAGE_FSTYPES vdi and live can't be built together\n") | 836 | status.addresult("Error, IMAGE_FSTYPES vdi and live can't be built together\n") |
837 | 837 | ||
838 | # Check /bin/sh links to dash or bash | ||
839 | real_sh = os.path.realpath('/bin/sh') | ||
840 | if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): | ||
841 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) | ||
838 | 842 | ||
839 | def check_sanity(sanity_data): | 843 | def check_sanity(sanity_data): |
840 | class SanityStatus(object): | 844 | class SanityStatus(object): |