Support DISABLE_PID_CHECK variable; print job version near job names

This commit is contained in:
Silvan Calarco 2011-09-30 20:25:00 +02:00
parent b615e12f43
commit 7ea9d02c39

View File

@ -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,9 +937,8 @@ 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}"
done
echo ") job"
@ -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