diff options
author | Alex Franco <alejandro.franco@linux.intel.com> | 2015-09-23 18:13:56 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-28 11:58:21 +0100 |
commit | 95daa7c26d119ae11f1835ce0e895bbd4a3e9605 (patch) | |
tree | 776e11636d8e9ba1358abf70ed68373a95cfea81 /meta/classes/sanity.bbclass | |
parent | 3d27dfb7e78b8e17b76fcc1d8f8e2b29ca26b0df (diff) | |
download | openembedded-core-95daa7c26d119ae11f1835ce0e895bbd4a3e9605.tar.gz openembedded-core-95daa7c26d119ae11f1835ce0e895bbd4a3e9605.tar.bz2 openembedded-core-95daa7c26d119ae11f1835ce0e895bbd4a3e9605.zip |
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@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r-- | meta/classes/sanity.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 2eb744fb7d..34f86180df 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) |