test $BUILD_USER = abuild && cp -p $BUILD_ROOT/root/.rpmrc $BUILD_ROOT/home/abuild/.rpmrc
# case arm, extract changetarget
# this is restricted to arm to make sure it doesn't interfere with x86
- buildarchtest=$( echo $BUILD_ARCH | grep -i arm )
- if [ x"$buildarchtest" != x"" ]; then
+ if [ "$BUILD_ARCH" != "${BUILD_ARCH#arm}" ]; then
echo "changing targetarch"
CHANGETARGET=$(getchangetarget --dist "$BUILD_DIST" --configdir "$BUILD_DIR/configs" --archpath "$BUILD_ARCH" )
echo "NEW TARGET: $CHANGETARGET"
test -d "$SRCDIR" && cd "$SRCDIR"
done
-RPMS=`find $BUILD_ROOT/$TOPDIR/RPMS -type f -name "*.rpm" 2>/dev/null`
-DEBS=`find $BUILD_ROOT/$TOPDIR/DEBS -type f -name "*.deb" 2>/dev/null`
+RPMS=`find $BUILD_ROOT/$TOPDIR/RPMS -type f -name "*.rpm" 2>/dev/null || true`
+DEBS=`find $BUILD_ROOT/$TOPDIR/DEBS -type f -name "*.deb" 2>/dev/null || true`
if test -n "$RPMS" -a -n "$BUILD_USER_ABUILD_USED" ; then
echo "... checking for files with abuild user/group"
fi
if test -n "$RPMS" -a -d "$BUILD_ROOT/usr/lib/build/checks" ; then
- mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
export PNAME=""
export DO_RPM_REMOVE=true
for SRPM in $BUILD_ROOT/$TOPDIR/SRPMS/*src.rpm ; do
echo "... running `basename $CHECKSCRIPT`"
$CHECKSCRIPT || cleanup_and_exit 1
done
- umount -n $BUILD_ROOT/proc 2> /dev/null
fi
if test -n "$RPMS" -a "$DO_CHECKS" != "false" -a -x "$BUILD_ROOT/opt/testing/bin/rpmlint" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" ; then
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"
# exit with 2, if packages built successfull, but have no changes to former built packages.
- mount -n -tproc none $BUILD_ROOT/proc 2> /dev/null
- chroot $BUILD_ROOT /usr/lib/build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS" && cleanup_and_exit 2
- umount -n $BUILD_ROOT/proc 2> /dev/null
+ if chroot $BUILD_ROOT /usr/lib/build/same-build-result.sh /.build.oldpackages "$TOPDIR/RPMS" "$TOPDIR/SRPMS"; then
+ cleanup_and_exit 2
+ fi
fi
echo