autoport: restore reworked code for selecting milestone rebuild packages

This commit is contained in:
Silvan Calarco 2013-05-25 22:33:43 +02:00
parent dc7de5b07c
commit c0f51ea3ac

View File

@ -333,12 +333,9 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist" echo "Warning: unable to fetch ${REPS_BASE_URL}/$PORT_REPOSITORY/srcpkglist"
curl -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$BASE_ARCH || curl -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH -o $DATADIR/$PORT_REPOSITORY/sources-$BASE_ARCH ||
echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH" echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$BASE_ARCH"
# rm -f $DATADIR/$PORT_REPOSITORY/sources-$BASE_ARCH
# curl -s $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_CPU -o $DATADIR/$PORT_REPOSITORY/sources-$TARGET_CPU || # old files cleanup
# echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_CPU"
rm -f $DATADIR/$PORT_REPOSITORY/sources-$TARGET_CPU rm -f $DATADIR/$PORT_REPOSITORY/sources-$TARGET_CPU
# curl -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh -o $DATADIR/$PORT_REPOSITORY/builds-$BASE_ARCH.sh ||
# echo "Error: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh"
rm -f $DATADIR/$PORT_REPOSITORY/builds-$BASE_ARCH.sh rm -f $DATADIR/$PORT_REPOSITORY/builds-$BASE_ARCH.sh
curl -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh -o $DATADIR/$PORT_REPOSITORY/builds-$TARGET_ARCH.sh || curl -s $PORT_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh -o $DATADIR/$PORT_REPOSITORY/builds-$TARGET_ARCH.sh ||
@ -349,19 +346,32 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
echo "Error: no jobs allowed in batch mode; aborting." echo "Error: no jobs allowed in batch mode; aborting."
exit 1 exit 1
} }
# curl -s $BASE_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh -o $DATADIR/$BASE_REPOSITORY/builds-$BASE_ARCH.sh || # old files cleanup
# echo "Error: unable to fetch $BASE_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh"
rm -f $DATADIR/$BASE_REPOSITORY/builds-$BASE_ARCH.sh rm -f $DATADIR/$BASE_REPOSITORY/builds-$BASE_ARCH.sh
# curl -s $BASE_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh -o $DATADIR/$BASE_REPOSITORY/builds-$TARGET_ARCH.sh ||
# echo "Error: unable to fetch $BASE_REPOSITORY_DISTROMATIC_URL/builds-$TARGET_ARCH.sh"
rm -f $DATADIR/$BASE_REPOSITORY/builds-$TARGET_ARCH.sh rm -f $DATADIR/$BASE_REPOSITORY/builds-$TARGET_ARCH.sh
get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH
port_pkg_list=${pkg_list[*]} port_pkg_list=${pkg_list[*]}
echo "Packages to port: ${needport_list[*]}"
for p in ${needport_list[*]}; do if [ "$REBUILD_MILESTONE" ]; then
JOB=(${JOB[*]} $p) for p in ${port_pkg_list}; do
done get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH $p
target_pkg_name=$pkg_name
target_pkg_ver=$pkg_version
target_pkg_rel=$pkg_release
target_pkg_milestone=`echo $target_pkg_rel | sed "s|[0-9.]*\(.*\)|\1|"`
if [ "$target_pkg_milestone" != "$REBUILD_MILESTONE" ]; then
JOB=(${JOB[*]} $p)
fi
done
echo "Packages to rebuild: ${JOB[*]}"
else
echo "Packages to port: ${needport_list[*]}"
for p in ${needport_list[*]}; do
JOB=(${JOB[*]} $p)
done
fi
[ -e $DATADIR/autoport-$PORT_REPOSITORY-current ] && \ [ -e $DATADIR/autoport-$PORT_REPOSITORY-current ] && \
mv $DATADIR/autoport-$PORT_REPOSITORY-current $DATADIR/autoport-$PORT_REPOSITORY-last mv $DATADIR/autoport-$PORT_REPOSITORY-current $DATADIR/autoport-$PORT_REPOSITORY-last
fi fi