From 74876ce852ea5c75c80ac28600dce9e33be68155 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 30 May 2013 13:19:38 +0200 Subject: [PATCH] autodist: don't update package version when --rebuild is passed --- autodist | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/autodist b/autodist index 98ee23b..2cc7615 100755 --- a/autodist +++ b/autodist @@ -1133,17 +1133,19 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do echo "%% "`log_date`" Starting UPDATE operation" > $LOGFILE if [ "${JOB_VER:0:1}" != "+" -o "${JOB_VER}" = "+0" ]; then -# --force-update \ - # check legacylist - awk '{ print $1 }' $LEGACYLIST | grep "^$JOB_NAME$" >/dev/null && { - echo "?= Job $JOB_NAME is in the legacy list; forcing rebuild" - ret=1 - } || { - [ "${AUTOSPEC_ARGS/--changelog}" = "${AUTOSPEC_ARGS}" ] && - AUTOSPEC_ARGS="$AUTOSPEC_ARGS --changelog \"automatic update by autodist\"" - launch_pkgs_loop autoupdate "$AUTOSPEC_ARGS $SEND_FORCE" - ret=$? - } + ret=1 + # don't update when --rebuild is passed + if [ ! "$rebuild_packages" ]; then + # check legacylist + awk '{ print $1 }' $LEGACYLIST | grep "^$JOB_NAME$" >/dev/null && { + echo "?= Job $JOB_NAME is in the legacy list; forcing rebuild" + } || { + [ "${AUTOSPEC_ARGS/--changelog}" = "${AUTOSPEC_ARGS}" ] && + AUTOSPEC_ARGS="$AUTOSPEC_ARGS --changelog \"automatic update by autodist\"" + launch_pkgs_loop autoupdate "$AUTOSPEC_ARGS $SEND_FORCE" + ret=$? + } + fi if [ $ret != 0 ]; then if [ ! "$rebuild_packages" -a "${JOB_VER}" != "+0" ]; then [ $ret -ge 2 -a "$do_autobuild" ] && {