diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2017-03-15 09:37:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-16 22:11:32 +0000 |
commit | ab2caed31ad7d20561643f4de9792f97d3a6bd5b (patch) | |
tree | f41263b1c9be9c17c7333d304042b6f2a60e76ca /meta/classes/sanity.bbclass | |
parent | 3fa723967901eeffcf30ebcdd85abfee8539795f (diff) | |
download | poky-ab2caed31ad7d20561643f4de9792f97d3a6bd5b.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: ef51746cdd12e6b08109e9bd90a0a465c3f9f93c)
Signed-off-by: Juro Bystricky <juro.bystricky@intel.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, 3 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index b5f4756f81..e3be40bf94 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -935,7 +935,9 @@ def check_sanity_everybuild(status, d): | |||
935 | # If /bin/sh is a symlink, check that it points to dash or bash | 935 | # If /bin/sh is a symlink, check that it points to dash or bash |
936 | if os.path.islink('/bin/sh'): | 936 | if os.path.islink('/bin/sh'): |
937 | real_sh = os.path.realpath('/bin/sh') | 937 | real_sh = os.path.realpath('/bin/sh') |
938 | if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): | 938 | # Due to update-alternatives, the shell name may take various |
939 | # forms, such as /bin/dash, bin/bash, /bin/bash.bash ... | ||
940 | if '/dash' not in real_sh and '/bash' not in real_sh: | ||
939 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) | 941 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) |
940 | 942 | ||
941 | def check_sanity(sanity_data): | 943 | def check_sanity(sanity_data): |