Changeset 464


Ignore:
Timestamp:
Oct 24, 2012, 1:23:31 AM (8 years ago)
Author:
amain
Message:

bitten: fix patch issue in slave

Location:
branches/contrib/bitten/slaves
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/contrib/bitten/slaves/bin/slave-cron

    r461 r464  
    3535
    3636ini=${1}
     37shift
    3738
    3839[ ! -f "${ini}" ] && usage
     
    4445for i in $(seq 1 ${dailybuilds_count})
    4546do
    46    ${BASEDIR}/bin/slave ${ini}
     47   ${BASEDIR}/bin/slave ${ini} $@
    4748done
    4849
  • branches/contrib/bitten/slaves/include/slaves.inc.sh

    r463 r464  
    3131fi
    3232
    33 if [ -f ${recipe} ]
     33if [ -f "${recipe}" ]
    3434then
    3535   # assume user supplied local recipy file
     
    5555function patches()
    5656{
    57    if ! bitten-slave -h | grep -q '\--exit-no-pending'
     57   bcount=$(find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' | wc -l)
     58
     59   if [ ${bcount} -eq 0 ]
    5860   then
    59       bcount=$(find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' | wc -l)
     61      echo "E: Can't find bitten-slave. Unable to apply patches."
     62      exit 1
     63   fi
    6064
    61       if [ ${bcount} -eq 0 ]
    62       then
    63          echo "E: Can't find bitten-slave. Unable to apply patches."
    64          exit 1
    65       fi
     65   find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' \
     66     | while read dir
     67       do
     68         sudo patch -N -p 1 -d ${dir} <${BASEDIR}/patches/001_exit_no_pending.patch #>/dev/null
     69         sudo patch -N -p 1 -d ${dir} <${BASEDIR}/patches/002_basedir_makedirs #>/dev/null
     70       done
    6671
    67       find /usr/local/lib/python2.6/dist-packages -name 'Bitten-*' \
    68         | while read dir
    69           do
    70             set -e
    71             sudo patch -N -s -p 1 -d ${dir} <${BASEDIR}/patches/001_exit_no_pending.patch >/dev/null
    72             sudo patch -N -s -p 1 -d ${dir} <${BASEDIR}/patches/002_basedir_makedirs >/dev/null
    73             set +e
    74           done
    75    fi
     72   echo
    7673}
    7774
     
    9895log                : ${log}
    9996mode               : ${mode}
     97recipe             : ${server_or_recipe}
    10098
    10199EOF
Note: See TracChangeset for help on using the changeset viewer.