make sure proc is mounted for build-compare (bnc#590462)
authorLudwig Nussel <ludwig.nussel@suse.de>
Wed, 24 Mar 2010 10:54:48 +0000 (11:54 +0100)
committerLudwig Nussel <ludwig.nussel@suse.de>
Wed, 24 Mar 2010 10:54:48 +0000 (11:54 +0100)
build

diff --git a/build b/build
index 779cc92..7d5d819 100755 (executable)
--- a/build
+++ b/build
@@ -1695,7 +1695,6 @@ if test \( -n "$RPMS" -o -n "$DEBS" \) -a -n "$CREATE_BASELIBS" -a \( -d "$BUILD
     if test -f $BUILD_ROOT/usr/lib/build/mkbaselibs -o "$CREATE_BASELIBS" != internal ; then
        mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
        create_baselibs
-       umount -n $BUILD_ROOT/proc 2> /dev/null
     fi
 fi
 
@@ -1720,6 +1719,7 @@ fi
 
 if test -n "$RPMS" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" -a -d "$BUILD_ROOT/.build.oldpackages" -a -x "$BUILD_ROOT/usr/lib/build/same-build-result.sh" ; then
     echo "... comparing built packages with the former built"
+    mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
     # exit with 2, if packages built successfull, but have no changes to former built packages.
     if chroot $BUILD_ROOT /usr/lib/build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then
        cleanup_and_exit 2