[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1867/8267] sanity.bbclass: Only verify /bin/sh link if it's a link
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1867/8267] sanity.bbclass: Only verify /bin/sh link if it's a link
- Date: Sat, 16 Dec 2017 22:25:44 +0000 (UTC)
commit 4b9c75a953120b7c4a370aac8e8d14111e86b36b
Author: Olof Johansson <olof johansson axis com>
Date: Wed Aug 10 09:38:48 2016 +0200
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>
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 088dd2a..98345ce 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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]