summaryrefslogtreecommitdiffstats
path: root/scripts/oe-setup-builddir
diff options
context:
space:
mode:
authorAlex Franco <alejandro.franco@linux.intel.com>2015-09-04 15:38:29 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:45:47 +0100
commitcf418deb32bf90479714e522e3fa309c41e47978 (patch)
treef8a48d3f202b49ac8796b29091899dde073ea5f0 /scripts/oe-setup-builddir
parentab1150773cd6298ba28a117536c3fcd2cfd32789 (diff)
downloadopenembedded-core-contrib-cf418deb32bf90479714e522e3fa309c41e47978.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] Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-setup-builddir')
-rwxr-xr-xscripts/oe-setup-builddir8
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
mkdir -p "$BUILDDIR/conf"
-# Attempting to remove sticky and setuid bits from BUILDDIR and
-# BUILDDIR/conf directories. #TODO appropriate checks for this
-chmod -st "$BUILDDIR" "$BUILDDIR/conf"
-
if [ ! -d "$BUILDDIR" ]; then
echo >&2 "Error: The builddir ($BUILDDIR) does not exist!"
exit 1
@@ -39,6 +35,10 @@ if [ ! -w "$BUILDDIR" ]; then
exit 1
fi
+# Attempting removal of sticky,setuid bits from BUILDDIR, BUILDDIR/conf
+chmod -st "$BUILDDIR" 2>/dev/null || echo "WARNING: unable to chmod $BUILDDIR"
+chmod -st "$BUILDDIR/conf" 2>/dev/null || echo "WARNING: unable to chmod $BUILDDIR/conf"
+
cd "$BUILDDIR"
if [ -f "$BUILDDIR/conf/templateconf.cfg" ]; then