From 7ea9d02c394ef20707044d82afbb670d8e15a131 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 30 Sep 2011 20:25:00 +0200 Subject: [PATCH] Support DISABLE_PID_CHECK variable; print job version near job names --- autodist | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/autodist b/autodist index a740429..984bc48 100755 --- a/autodist +++ b/autodist @@ -111,7 +111,7 @@ for ((i=1; i<=$#; i++)); do SEVERITY=1 [ -e $PIDFILE ] && { PIDCHECK=`cat $PIDFILE` - [ "$PIDCHECK" -a -e /proc/$PIDCHECK ] && { + [ "$PIDCHECK" -a -e /proc/$PIDCHECK -a ! "$DISABLE_PID_CHECK" ] && { echo "Error: autodist -a already running with PID=$PIDCHECK.Aborting." exit 1 } @@ -908,7 +908,6 @@ if [ "$do_autobuild" = "1" ]; then done < $srctmpfile echo "%% Total pkgs: $PKGCOUNT, skipped list: $SKIPPEDCOUNT, blacklist: $BLACKLISTCOUNT, success list: $SUCCESSLISTCOUNT" - while read line; do set -- $line PKGNAME=${1} @@ -917,11 +916,14 @@ if [ "$do_autobuild" = "1" ]; then JOBNAME[${#JOBNAME[@]}]=$PKGNAME done < $pkgtmpfile - echo "%% autoupdate jobs: ${JOBNAME[*]}" + echo -n "%% autoupdate jobs: " + for i in `seq 1 ${#JOBNAME[@]}`; do + echo -n "${JOBNAME[$i-1]}(${JOBVER[$i-1]}) " + done + echo rm -f $pkgtmpfile $srctmpfile fi - echo "%% ${#JOBNAME[*]} job(s) scheduled" echo "%% Starting main jobs loop" for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do @@ -935,10 +937,9 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do [ "$quiet" ] || echo " == =======================$JOB_NAME=============================" - echo -n "%% Doing $JOB_NAME (" + echo -n "%% Doing $JOB_NAME (VER=$JOB_VER" for k in ${JOB_VARNAMES[*]}; do - [ "$k" != "${JOB_VARNAMES[0]}" ] && echo -n " " - echo -n "%${k}" + echo -n " %${k}" done echo ") job" @@ -987,7 +988,7 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do LOGFILE=$LOGDIR/last echo "%% Starting UPDATE operation @ `LANG=C date`" echo "%% "`log_date`" Starting UPDATE operation" > $LOGFILE - + if [ "${JOB_VER:0:1}" != "+" -o "${JOB_VER}" = "+0" ]; then # --force-update \ # check legacylist @@ -1039,7 +1040,7 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do echo "%% Updating to version ${JOB_VER:1}" # WARNING: JOB_VER must be passed to launch_pkgs_loop as the first string in the second parameter [ "${AUTOSPEC_ARGS/--changelog}" = "${AUTOSPEC_ARGS}" ] && - AUTOSPEC_ARGS="$AUTOSPEC_ARGS --changelog \"automatic update to ${JOB_VER:1} by autodist\"" + AUTOSPEC_ARGS="$AUTOSPEC_ARGS --changelog \"automatic version update by autodist\"" launch_pkgs_loop update "${JOB_VER:1} $AUTOSPEC_ARGS $SEND_FORCE \ --define gnomever=$GNOME_VER" || { if [ ! "$rebuild_packages" ]; then