diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-03-15 12:39:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-18 13:07:32 +0100 |
commit | 7549ae82cdafdebc587cbfd21ac4a96f47903398 (patch) | |
tree | cbc60e92e76de7c010da15a2d678504f251f64ee /meta/classes | |
parent | 99c6c878ee122a04f23ef49ea653208ca1c7aa77 (diff) | |
download | poky-7549ae82cdafdebc587cbfd21ac4a96f47903398.tar.gz |
sanity.bbclass: modify check for shell
Due to the recently implemented update-alternatives for bash binary,
sanity checker may end up with a (false-positive) error such as:
Error, /bin/sh links to /bin/bash.bash, must be dash or bash
This patch modifies the test: presence of "/bash" or "/dash" in shell binary
name results in pass.
[YOCTO#11108]
(From OE-Core rev: 3f2bc735e514b27a21ac47524fe0c5ca16e19dd7)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sanity.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 7682ffbb8c..a11b581a08 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -929,7 +929,9 @@ def check_sanity_everybuild(status, d): | |||
929 | # If /bin/sh is a symlink, check that it points to dash or bash | 929 | # If /bin/sh is a symlink, check that it points to dash or bash |
930 | if os.path.islink('/bin/sh'): | 930 | if os.path.islink('/bin/sh'): |
931 | real_sh = os.path.realpath('/bin/sh') | 931 | real_sh = os.path.realpath('/bin/sh') |
932 | if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): | 932 | # Due to update-alternatives, the shell name may take various |
933 | # forms, such as /bin/dash, bin/bash, /bin/bash.bash ... | ||
934 | if '/dash' not in real_sh and '/bash' not in real_sh: | ||
933 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) | 935 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) |
934 | 936 | ||
935 | def check_sanity(sanity_data): | 937 | def check_sanity(sanity_data): |