test -d "$SRCDIR" && cd "$SRCDIR"
done
-if test -n "$BUILD_USER_ABUILD_USED" ; then
+RPMS=`find $BUILD_ROOT/$TOPDIR/RPMS -type f -name "*.rpm"`
+
+if test -n "$RPMS" -a -n "$BUILD_USER_ABUILD_USED" ; then
echo "... checking for files with abuild user/group"
BADFILE=
- RPMS=`find $BUILD_ROOT/$TOPDIR/RPMS -type f -name "*.rpm"`
- if test -n "$RPMS" ; then
- while read un gn fn ; do
- if test "$un" = abuild -o "$gn" = abuild -o "$un" = 399 -o "$gn" = 399 ; then
- echo " $un $gn $fn"
- BADFILE=true
- fi
- done < <(rpm -qp --qf '[%{FILEUSERNAME} %{FILEGROUPNAME} %{FILENAMES}\n]' $RPMS)
- fi
+ while read un gn fn ; do
+ if test "$un" = abuild -o "$gn" = abuild -o "$un" = 399 -o "$gn" = 399 ; then
+ echo " $un $gn $fn"
+ BADFILE=true
+ fi
+ done < <(rpm -qp --qf '[%{FILEUSERNAME} %{FILEGROUPNAME} %{FILENAMES}\n]' $RPMS)
if test -n "$BADFILE" ; then
echo "please fix your filelist (e.g. add defattr)"
cleanup_and_exit 1
fi
fi
-if test -d $BUILD_ROOT/usr/lib/build/checks ; then
+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
umount -n $BUILD_ROOT/proc 2> /dev/null
fi
-if test "$DO_CHECKS" != "false" -a -x $BUILD_ROOT/opt/testing/bin/rpmlint -a -d "$BUILD_ROOT/$TOPDIR/RPMS" ; then
+if test -n "$RPMS" -a "$DO_CHECKS" != "false" -a -x "$BUILD_ROOT/opt/testing/bin/rpmlint" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" ; then
LINT_RPM_FILE_LIST=($(find $BUILD_ROOT/$TOPDIR/RPMS \
\( -name "*-debuginfo-*" -o -name "*-debugsource-*" \
-o -name "*-32bit-*" -o -name "*-64bit-*" \
chroot $BUILD_ROOT /opt/testing/bin/rpmlint --info ${LINT_RPM_FILE_LIST[*]#$BUILD_ROOT} ${SRPM_FILE_LIST[*]#$BUILD_ROOT} || cleanup_and_exit 1
fi
-if test -n "$CREATE_BASELIBS" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" ; then
+if test -n "$RPMS" -a -n "$CREATE_BASELIBS" -a -d "$BUILD_ROOT/$TOPDIR/RPMS" ; then
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