summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorAlex Franco <alejandro.franco@linux.intel.com>2015-09-23 18:13:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-28 12:00:20 +0100
commitc5aab3f63ec015d95993a4185b77c9476e170c2e (patch)
tree0e246bdaacfe4d318fd94c032ed0d7435edfca25 /meta/classes/sanity.bbclass
parent5702a19f1c91f9d091a15ad30e73f946c5f9fd31 (diff)
downloadpoky-c5aab3f63ec015d95993a4185b77c9476e170c2e.tar.gz
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] (From OE-Core rev: 95daa7c26d119ae11f1835ce0e895bbd4a3e9605) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass9
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):
839 else: 839 else:
840 bb.utils.mkdirhier(tmpdir) 840 bb.utils.mkdirhier(tmpdir)
841 # Remove setuid, setgid and sticky bits from TMPDIR 841 # Remove setuid, setgid and sticky bits from TMPDIR
842 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID) 842 try:
843 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID) 843 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISUID)
844 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX) 844 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISGID)
845 os.chmod(tmpdir, os.stat(tmpdir).st_mode & ~ stat.S_ISVTX)
846 except OSError:
847 bb.warn("Unable to chmod TMPDIR: %s" % tmpdir)
845 with open(checkfile, "w") as f: 848 with open(checkfile, "w") as f:
846 f.write(tmpdir) 849 f.write(tmpdir)
847 850