summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorOlof Johansson <olof.johansson@axis.com>2016-08-10 09:38:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-17 10:31:10 +0100
commiteaa0dc21a5f058a39bd7867bd3cafdb3407abe36 (patch)
treeb6d7750cfa9aa9492a8ee04db4fa3699262c7a87 /meta/classes/sanity.bbclass
parent4ad1220e0a7f9ca9096860f4f9ae7017b36e29e4 (diff)
downloadopenembedded-core-contrib-eaa0dc21a5f058a39bd7867bd3cafdb3407abe36.tar.gz
openembedded-core-contrib-eaa0dc21a5f058a39bd7867bd3cafdb3407abe36.tar.bz2
openembedded-core-contrib-eaa0dc21a5f058a39bd7867bd3cafdb3407abe36.zip
sanity.bbclass: Only verify /bin/sh link if it's a link
If /bin/sh is a regular file (and not a symlink), we assume it's a reasonable shell and allow it. Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 088dd2ac23..98345ce103 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -932,10 +932,11 @@ def check_sanity_everybuild(status, d):
with open(checkfile, "w") as f:
f.write(tmpdir)
- # Check /bin/sh links to dash or bash
- real_sh = os.path.realpath('/bin/sh')
- if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
- status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
+ # 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'):
+ status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh)
def check_sanity(sanity_data):
class SanityStatus(object):