Move chown up as debian builds need it earlier if files have too restrictive permissions.
authorJan-Simon Möller <jansimon.moeller@opensuse.org>
Fri, 19 Feb 2010 14:41:48 +0000 (15:41 +0100)
committerJan-Simon Möller <jansimon.moeller@opensuse.org>
Fri, 19 Feb 2010 14:41:48 +0000 (15:41 +0100)
build

diff --git a/build b/build
index 71c4c34..faaf645 100755 (executable)
--- a/build
+++ b/build
@@ -1362,6 +1362,12 @@ for SPECFILE in "${SPECFILES[@]}" ; do
     CHANGELOGARGS=
     test -n "$CHANGELOG" -a -f "$BUILD_ROOT/.build-changelog" && CHANGELOGARGS="--changelog $BUILD_ROOT/.build-changelog"
 
+    if test $BUILD_USER = abuild ; then
+       chown -R 399:399 $BUILD_ROOT$TOPDIR/*
+    else
+       chown -R root:root $BUILD_ROOT$TOPDIR/*
+    fi
+
     if test "$BUILDTYPE" = spec ; then
        # do buildrequires/release substitution
        args=()
@@ -1438,11 +1444,6 @@ for SPECFILE in "${SPECFILES[@]}" ; do
        chroot $BUILD_ROOT su -c "dpkg-source -x $DEB_SOURCEDIR/$DEB_DSCFILE $TOPDIR/BUILD" - $BUILD_USER
     fi
 
-    if test $BUILD_USER = abuild ; then
-       chown -R 399:399 $BUILD_ROOT$TOPDIR/*
-    else
-       chown -R root:root $BUILD_ROOT$TOPDIR/*
-    fi
     cd $BUILD_ROOT$TOPDIR/SOURCES || cleanup_and_exit 1
 
     echo -----------------------------------------------------------------