From d99d231b4742b81458a84c695062a9ec845784e4 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 22 May 2013 00:02:14 +0200 Subject: [PATCH] autodist: avoid calling autospec send with --nosrpm --norpm (for autoport) --- autodist | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/autodist b/autodist index 567f7e9..915d936 100755 --- a/autodist +++ b/autodist @@ -1263,9 +1263,11 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do exit 1 ;; esac } - echo "== sending source rpms" - launch_pkgs_loop send "$AUTOSPEC_ARGS --norpm $SEND_SERVER_CMD" - if [ $? -gt 0 ]; then + # avoid calling autospec with --nosrpm --norpm (not working as expected and not useful) + if [ "$AUTOSPEC_ARGS/--nosrpm" = "$AUTOSPEC_ARGS" ]; then + echo "== sending source rpms" + launch_pkgs_loop send "$AUTOSPEC_ARGS --norpm $SEND_SERVER_CMD" + if [ $? -gt 0 ]; then case $SEVERITY in 0) ;; 1) echo "%! Error sending sources; skipping $JOB_NAME job." @@ -1273,15 +1275,16 @@ for JOB_NUM in `seq 1 ${#JOBNAME[*]}`; do *) echo "!! Error sending sources; aborting." exit 1 ;; esac - else - # archive patches - if [ "$do_autobuild" ]; then - [ -e $AUTOUPDATEDIR/spec-patches-update/$JOB_NAME.spec.patch ] && \ - mv $AUTOUPDATEDIR/spec-patches-update/$JOB_NAME.spec.patch \ - $AUTOUPDATEDIR/spec-patches-update/old/${JOB_NAME}.spec.${DATE_NOW}.patch - [ -e $AUTOUPDATEDIR/spec-patches-build/$JOB_NAME.spec.patch ] && \ - mv $AUTOUPDATEDIR/spec-patches-build/${JOB_NAME}.spec.${DATE_NOW}.patch \ - $AUTOUPDATEDIR/spec-patches-build/old/${JOB_NAME}.spec.${DATE_NOW}.patch + else + # archive patches + if [ "$do_autobuild" ]; then + [ -e $AUTOUPDATEDIR/spec-patches-update/$JOB_NAME.spec.patch ] && \ + mv $AUTOUPDATEDIR/spec-patches-update/$JOB_NAME.spec.patch \ + $AUTOUPDATEDIR/spec-patches-update/old/${JOB_NAME}.spec.${DATE_NOW}.patch + [ -e $AUTOUPDATEDIR/spec-patches-build/$JOB_NAME.spec.patch ] && \ + mv $AUTOUPDATEDIR/spec-patches-build/${JOB_NAME}.spec.${DATE_NOW}.patch \ + $AUTOUPDATEDIR/spec-patches-build/old/${JOB_NAME}.spec.${DATE_NOW}.patch + fi fi fi fi