[oe-commits] [openembedded-core] 02/52: sanity.bbclass: modify check for shell
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 16 17:38:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit ef51746cdd12e6b08109e9bd90a0a465c3f9f93c
Author: Juro Bystricky <juro.bystricky at intel.com>
AuthorDate: Wed Mar 15 09:37:39 2017 -0700
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]
Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/sanity.bbclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index b5f4756..e3be40b 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -935,7 +935,9 @@ def check_sanity_everybuild(status, d):
# If /bin/sh is a symlink, check that it points to dash or bash
if os.path.islink('/bin/sh'):
real_sh = os.path.realpath('/bin/sh')
- if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
+ # Due to update-alternatives, the shell name may take various
+ # forms, such as /bin/dash, bin/bash, /bin/bash.bash ...
+ if '/dash' not in real_sh and '/bash' not in real_sh:
status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
def check_sanity(sanity_data):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list