autodist: fix checks for already up to date packages and avoid failure with multiple packages scheduled
This commit is contained in:
parent
32ddc9a1ef
commit
57e10e58b4
27
autodist
27
autodist
@ -515,7 +515,7 @@ function launch_pkgs_loop() {
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
[ "$operation" = "update" -o "$operation" = "autoupdate" ] && return 0
|
||||
[ "$operation" = "update" -o "$operation" = "autoupdate" ] && continue
|
||||
fi
|
||||
fi
|
||||
$SCRIPT_UPDATE_SPECFILE $spec_dir/$pkg.spec
|
||||
@ -569,10 +569,11 @@ function launch_pkgs_loop() {
|
||||
# skip package in job if up to date
|
||||
if [ "$PKGLINE" ]; then
|
||||
set -- $PKGLINE
|
||||
pkglinever=$2
|
||||
# warning: assuming version is passed first
|
||||
version_find_bigger ${passed_arguments/ *} $2
|
||||
version_find_bigger "${passed_arguments/ *}" "$pkglinever"
|
||||
[ $? -eq 1 ] || {
|
||||
echo "Warning: skipping ${pkg} package already up to date."
|
||||
echo "Warning: skipping ${pkg} package already up to date ($pkglinever >= ${passed_arguments/ *})."
|
||||
continue
|
||||
}
|
||||
fi
|
||||
@ -591,12 +592,14 @@ function launch_pkgs_loop() {
|
||||
# skip package in job if up to date
|
||||
if [ "$PKGLINE" ]; then
|
||||
set -- $PKGLINE
|
||||
pkglinever=$2
|
||||
pkglinerel=$6
|
||||
# warning: assuming version is passed first
|
||||
version_find_bigger $SPEC_VERSION $2
|
||||
version_find_bigger "$SPEC_VERSION" "$pkglinever"
|
||||
[ $? -eq 0 ] && {
|
||||
version_find_bigger $SPEC_RELEASE $6
|
||||
version_find_bigger "$SPEC_RELEASE" "$pkglinerel"
|
||||
if [ $? -ne 1 ]; then
|
||||
echo "Warning: skipping ${pkg} package already up to date."
|
||||
echo "Warning: skipping ${pkg} package already up to date ($SPEC_VERSION-$SPEC_RELEASE >= $pkglinever-$pkglinerel)."
|
||||
continue
|
||||
fi
|
||||
}
|
||||
@ -614,12 +617,14 @@ function launch_pkgs_loop() {
|
||||
# skip package in job if up to date
|
||||
if [ "$PKGLINE" -a "$do_autobuild" ]; then
|
||||
set -- $PKGLINE
|
||||
pkglinever=$2
|
||||
pkglinerel=$6
|
||||
# warning: assuming version is passed first
|
||||
version_find_bigger $SPEC_VERSION $2
|
||||
version_find_bigger "$SPEC_VERSION" "$pkglinever"
|
||||
[ $? -eq 0 ] && {
|
||||
version_find_bigger $SPEC_RELEASE $6
|
||||
version_find_bigger "$SPEC_RELEASE" "$pkglinerel"
|
||||
if [ $? -ne 1 ]; then
|
||||
echo "Warning: skipping ${pkg} package already up to date."
|
||||
echo "Warning: skipping ${pkg} package already up to date ($SPEC_VERSION-$SPEC_RELEASE >= $pkglinever-$pkglinerel)."
|
||||
continue
|
||||
fi
|
||||
}
|
||||
@ -846,7 +851,7 @@ if [ "$do_autobuild" = "1" ]; then
|
||||
# jobs are not fully rebuilt
|
||||
for j in ${JOB_PKGS[*]}; do
|
||||
REPVER=`grep "^$j " $SRCPKGLIST | gawk '{ print $2 }'`
|
||||
version_find_bigger $TRVER $REPVER
|
||||
version_find_bigger "$TRVER" "$REPVER"
|
||||
[ $? -eq 1 ] && NEED_REBUILD=1
|
||||
done
|
||||
else
|
||||
@ -1034,7 +1039,7 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do
|
||||
## skip package in job if up to date
|
||||
#for j in ${JOB_PKGS[*]}; do
|
||||
# REPVER=`grep "^$j " $SRCPKGLIST | gawk '{ print $2 }'`
|
||||
# version_find_bigger $TRVER $REPVER
|
||||
# version_find_bigger "$TRVER" "$REPVER"
|
||||
# [ $? -eq 1 ] && NEED_REBUILD=1
|
||||
# done
|
||||
echo "%% Updating to version ${JOB_VER:1}"
|
||||
|
Loading…
Reference in New Issue
Block a user