Skip to contentSkip to conversation

Move BUILDDIR chmod fix after checks

PATCH New Alex Franco 1 participant 1 message Sep 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move BUILDDIR chmod fix after checks

Makes more sense to have this fix after checking BUILDDIR exists, is a directory and is writable.

[YOCTO #7669]

---
 scripts/oe-setup-builddir | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/oe-setup-builddir +4 -4
index 25d9f13..2598ba8 100755
@@ -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
Signature · 1 line
2.5.1