]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts: Move BUILDDIR chmod fix after checks in oe-setup-builddir
authorAlex Franco <alejandro.franco@linux.intel.com>
Fri, 4 Sep 2015 20:38:29 +0000 (15:38 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Sep 2015 21:45:47 +0000 (22:45 +0100)
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>
scripts/oe-setup-builddir

index 25d9f134a18d0954fe6e9ae943a57985aa2d34e7..2598ba852d198d28f72f79fbb9f33f30fae66a6f 100755 (executable)
@@ -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