From c0f51ea3ac2640ba17340adce31f016c2962fd9c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 25 May 2013 22:33:43 +0200 Subject: [PATCH] autoport: restore reworked code for selecting milestone rebuild packages --- autoport | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/autoport b/autoport index b046f99..40986f2 100755 --- a/autoport +++ b/autoport @@ -333,12 +333,9 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do 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 || 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 || -# echo "Warning: unable to fetch $PORT_REPOSITORY_DISTROMATIC_URL/sources-$TARGET_CPU" + + # old files cleanup 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 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." exit 1 } -# curl -s $BASE_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh -o $DATADIR/$BASE_REPOSITORY/builds-$BASE_ARCH.sh || -# echo "Error: unable to fetch $BASE_REPOSITORY_DISTROMATIC_URL/builds-$BASE_ARCH.sh" + # old files cleanup 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 get_pkg_buildinfo $DATADIR/$PORT_REPOSITORY $TARGET_ARCH port_pkg_list=${pkg_list[*]} - echo "Packages to port: ${needport_list[*]}" - for p in ${needport_list[*]}; do - JOB=(${JOB[*]} $p) - done + + if [ "$REBUILD_MILESTONE" ]; then + for p in ${port_pkg_list}; do + 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 ] && \ mv $DATADIR/autoport-$PORT_REPOSITORY-current $DATADIR/autoport-$PORT_REPOSITORY-last fi