exit 1
fi
-if test `find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l` != `find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l`; then
- echo "different number of subpackages"
- find $OLDDIR $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm'
- exit 1
-fi
+first_rpm=$(find $NEWDIRS -name *.rpm | head -1)
+dist=$(rpm -qp --nodigest --nosignature --qf "%{DISTRIBUTION}" $first_rpm | sed -r 's/(.*)\/.*/\1/')
+prerelease=0
+if [[ $dist =~ "prerelease" ]]; then
+ echo "This is a prerelease project. Do not check the existence of source rpm files."
+
+ prerelease=1
+ num_new_pkgs=`find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' -and ! -name '*.src.rpm' | wc -l`
+ num_old_pkgs=`find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' -and ! -name '*.src.rpm' | wc -l`
+ if test $num_new_pkgs != $num_old_pkgs; then
+ echo "different number of subpackages"
+ find $OLDDIR $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm'
+ exit 1
+ fi
-osrpm=$(find "$OLDDIR" -name \*src.rpm)
-nsrpm=$(find $NEWDIRS -name \*src.rpm)
+else
+ if test `find $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l` != `find $OLDDIR -name '*.rpm' -and ! -name '*.delta.rpm' | wc -l`; then
+ echo "different number of subpackages"
+ find $OLDDIR $NEWDIRS -name '*.rpm' -and ! -name '*.delta.rpm'
+ exit 1
+ fi
-if test ! -f "$osrpm"; then
- echo no old source rpm in $OLDDIR
- exit 1
-fi
+ osrpm=$(find "$OLDDIR" -name \*src.rpm)
+ nsrpm=$(find $NEWDIRS -name \*src.rpm)
-if test ! -f "$nsrpm"; then
- echo no new source rpm in $NEWDIRS
- exit 1
-fi
+ if test ! -f "$osrpm"; then
+ echo no old source rpm in $OLDDIR
+ exit 1
+ fi
+
+ if test ! -f "$nsrpm"; then
+ echo no new source rpm in $NEWDIRS
+ exit 1
+ fi
-echo "compare $osrpm $nsrpm"
-bash $SCMPSCRIPT "$osrpm" "$nsrpm" || exit 1
+ echo "compare $osrpm $nsrpm"
+ bash $SCMPSCRIPT "$osrpm" "$nsrpm" || exit 1
+fi
# technically we should not all exclude all -32bit but filter for different archs,
# like done with -x86
fi
if test -n "$OTHERDIR"; then
- if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
- file1=`mktemp`
- file2=`mktemp`
- echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
- # Sort the files first since the order of messages is not deterministic
- # Remove release from files
- sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
- sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
- if ! cmp -s $file1 $file2; then
- echo "rpmlint.log files differ:"
- diff -u $file1 $file2 |head -n 20
+ if [ $prerelease -eq 1 ] ; then
+ echo "do not compare rpmlint.log if it is a prerelease project!"
+ else
+ if test -e $OLDDIR/rpmlint.log -a -e $OTHERDIR/rpmlint.log; then
+ file1=`mktemp`
+ file2=`mktemp`
+ echo "comparing $OLDDIR/rpmlint.log and $OTHERDIR/rpmlint.log"
+ # Sort the files first since the order of messages is not deterministic
+ # Remove release from files
+ sort -u $OLDDIR/rpmlint.log|sed -e "s,$ver_rel1,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file1
+ sort -u $OTHERDIR/rpmlint.log|sed -e "s,$ver_rel2,@VERSION@-@RELEASE@,g" -e "s|/tmp/rpmlint\..*spec|.spec|g" > $file2
+ if ! cmp -s $file1 $file2; then
+ echo "rpmlint.log files differ:"
+ diff -u $file1 $file2 |head -n 20
+ SUCCESS=0
+ fi
+ rm $file1 $file2
+ elif test -e $OTHERDIR/rpmlint.log; then
+ echo "rpmlint.log is new"
SUCCESS=0
fi
- rm $file1 $file2
- elif test -e $OTHERDIR/rpmlint.log; then
- echo "rpmlint.log is new"
- SUCCESS=0
fi
appdatas=`cd $OTHERDIR && find . -name *-appdata.xml`