aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-03-15 12:39:12 -0700
committerArmin Kuster <akuster808@gmail.com>2017-04-01 08:41:18 -0400
commitbe6a84ab82e636afc21a42249605389a1875a302 (patch)
tree04feb6f86c72ef796a407214fe92d8a8f2afed63
parent1c83c4826fed80f2e89c8b9ad3c4b3d1180ef0d4 (diff)
downloadopenembedded-core-contrib-be6a84ab82e636afc21a42249605389a1875a302.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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/classes/sanity.bbclass4
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):
# 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):