- fix building on RHEL4 again
authorAdrian Schröter <adrian@suse.de>
Tue, 12 Jun 2012 15:28:43 +0000 (17:28 +0200)
committerAdrian Schröter <adrian@suse.de>
Tue, 12 Jun 2012 15:28:43 +0000 (17:28 +0200)
build

diff --git a/build b/build
index 8fda394..b055e73 100755 (executable)
--- a/build
+++ b/build
@@ -1771,9 +1771,12 @@ for SPECFILE in "${SPECFILES[@]}" ; do
        check_exit
        # arbitrary limit of 10MB
        if test $((`stat -f -c "%a*%S/1024/1024" $BUILD_ROOT`)) -lt 10; then
-           df -h $BUILD_ROOT
-           echo "build does not work on a completely full filesystem"
-           cleanup_and_exit 1
+            # ensure that old stat is not failing (RHEL4)
+            if df $BUILD_ROOT 2>/dev/null | grep -q "100%"; then
+               df -h $BUILD_ROOT
+               echo "build does not work on a completely full filesystem"
+               cleanup_and_exit 1
+           fi
        fi
        mount -n -tproc none $BUILD_ROOT/proc || true
        mount -n -tdevpts none $BUILD_ROOT/dev/pts