[oe-commits] Alex Franco : sanity.bbclass: show warning when chmod fails
git at git.openembedded.org
git at git.openembedded.org
Sat Sep 26 17:14:29 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: e6aac8f37d1fb9d5ccc45fd6b1cd9d237a048393
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e6aac8f37d1fb9d5ccc45fd6b1cd9d237a048393
Author: Alex Franco <alejandro.franco at linux.intel.com>
Date: Wed Sep 23 18:13:56 2015 +0200
sanity.bbclass: show warning when chmod fails
* 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>
Signed-off-by: Ross Burton <ross.burton at intel.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)
More information about the Openembedded-commits
mailing list