diff options
author | Olof Johansson <olof.johansson@axis.com> | 2016-08-10 09:38:48 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:39 +0100 |
commit | 4b9c75a953120b7c4a370aac8e8d14111e86b36b (patch) | |
tree | 853f1614e7e84c0ef85f3402b19766fb05abcc31 /meta/classes/sanity.bbclass | |
parent | 9375b7effa5b4ae32da274d7b7919ba28b9186a6 (diff) | |
download | poky-4b9c75a953120b7c4a370aac8e8d14111e86b36b.tar.gz |
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.
(From OE-Core rev: eaa0dc21a5f058a39bd7867bd3cafdb3407abe36)
Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Ross Burton <ross.burton@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 | 9 |
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): | |||
932 | with open(checkfile, "w") as f: | 932 | with open(checkfile, "w") as f: |
933 | f.write(tmpdir) | 933 | f.write(tmpdir) |
934 | 934 | ||
935 | # Check /bin/sh links to dash or bash | 935 | # If /bin/sh is a symlink, check that it points to dash or bash |
936 | real_sh = os.path.realpath('/bin/sh') | 936 | if os.path.islink('/bin/sh'): |
937 | if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): | 937 | real_sh = os.path.realpath('/bin/sh') |
938 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) | 938 | if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): |
939 | status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) | ||
939 | 940 | ||
940 | def check_sanity(sanity_data): | 941 | def check_sanity(sanity_data): |
941 | class SanityStatus(object): | 942 | class SanityStatus(object): |