[OE-core] [PATCH] sanity.bbclass: show warning when chmod fails
Martin Jansa
martin.jansa at gmail.com
Wed Sep 23 16:13:56 UTC 2015
From: Alex Franco <alejandro.franco at linux.intel.com>
* for some reason this part of:
http://patchwork.openembedded.org/patch/102561/
wasn't ever merged.
[YOCTO #7669]
Signed-off-by: Alex Franco <alejandro.franco at linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta/classes/sanity.bbclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 2eb744f..34f8618 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -839,9 +839,12 @@ def check_sanity_everybuild(status, d):
else:
bb.utils.mkdirhier(tmpdir)
# Remove setuid, setgid and sticky bits from TMPDIR
- os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
- os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
- os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
+ try:
+ os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
+ os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
+ os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
+ except OSError:
+ bb.warn("Unable to chmod TMPDIR: %s" % tmpdir)
with open(checkfile, "w") as f:
f.write(tmpdir)
--
2.5.3
More information about the Openembedded-core
mailing list