diff options
author | Alex Franco <alejandro.franco@linux.intel.com> | 2015-09-04 15:38:29 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:48:29 +0100 |
commit | 53e09c5d14bb4f719e5c56fb1ac4918fe0d7dd5e (patch) | |
tree | 7be7456c3eeb8a815c6e7f65b7106f350190c5c1 /scripts | |
parent | 77523c0e143a1e996f3208f8cee5da64b324e578 (diff) | |
download | poky-53e09c5d14bb4f719e5c56fb1ac4918fe0d7dd5e.tar.gz |
scripts: Move BUILDDIR chmod fix after checks in oe-setup-builddir
Makes more sense to have this fix after checking BUILDDIR exists, is
a directory and is writable.
[YOCTO #7669]
(From OE-Core rev: cf418deb32bf90479714e522e3fa309c41e47978)
Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-setup-builddir | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index 25d9f134a1..2598ba852d 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir | |||
@@ -25,10 +25,6 @@ fi | |||
25 | 25 | ||
26 | mkdir -p "$BUILDDIR/conf" | 26 | mkdir -p "$BUILDDIR/conf" |
27 | 27 | ||
28 | # Attempting to remove sticky and setuid bits from BUILDDIR and | ||
29 | # BUILDDIR/conf directories. #TODO appropriate checks for this | ||
30 | chmod -st "$BUILDDIR" "$BUILDDIR/conf" | ||
31 | |||
32 | if [ ! -d "$BUILDDIR" ]; then | 28 | if [ ! -d "$BUILDDIR" ]; then |
33 | echo >&2 "Error: The builddir ($BUILDDIR) does not exist!" | 29 | echo >&2 "Error: The builddir ($BUILDDIR) does not exist!" |
34 | exit 1 | 30 | exit 1 |
@@ -39,6 +35,10 @@ if [ ! -w "$BUILDDIR" ]; then | |||
39 | exit 1 | 35 | exit 1 |
40 | fi | 36 | fi |
41 | 37 | ||
38 | # Attempting removal of sticky,setuid bits from BUILDDIR, BUILDDIR/conf | ||
39 | chmod -st "$BUILDDIR" 2>/dev/null || echo "WARNING: unable to chmod $BUILDDIR" | ||
40 | chmod -st "$BUILDDIR/conf" 2>/dev/null || echo "WARNING: unable to chmod $BUILDDIR/conf" | ||
41 | |||
42 | cd "$BUILDDIR" | 42 | cd "$BUILDDIR" |
43 | 43 | ||
44 | if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then | 44 | if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then |