<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Taken for submission,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br>Thank you,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 11:03 AM, Ed Bartosh <span dir="ltr"><<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">ed.bartosh@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Replaced tabs with 4 spaces.<br>
Removed useless semicolons at the end of lines.<br>
<br>
Signed-off-by: Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
---<br>
 bitbake/bin/toaster | 125 ++++++++++++++++++++++++++--------------------------<br>
 1 file changed, 62 insertions(+), 63 deletions(-)<br>
<br>
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster<br>
index dde4519..162d4d9 100755<br>
--- a/bitbake/bin/toaster<br>
+++ b/bitbake/bin/toaster<br>
@@ -30,65 +30,65 @@<br>
<br>
 function webserverKillAll()<br>
 {<br>
-  Â  Â  Â local pidfile<br>
-  Â  Â  Â for pidfile in ${BUILDDIR}/.toastermain.pid; do<br>
-  Â  Â  Â  Â  Â  Â  Â if [ -f ${pidfile} ]; then<br>
-  Â  Â  Â  Â  Â  Â  Â while kill -0 $(< ${pidfile}) 2>/dev/null; do<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â kill -SIGTERM -$(< ${pidfile}) 2>/dev/null<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â sleep 1;<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â # Kill processes if they are still running - may happen in interactive shells<br>
-  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill<br>
-  Â  Â  Â  Â  Â  Â  Â done;<br>
-  Â  Â  Â  Â  Â  Â  Â rm  ${pidfile}<br>
-  Â  Â  Â  Â  Â  Â  Â fi<br>
-  Â  Â  Â done<br>
+  Â  local pidfile<br>
+  Â  for pidfile in ${BUILDDIR}/.toastermain.pid; do<br>
+  Â  Â  Â  if [ -f ${pidfile} ]; then<br>
+  Â  Â  Â  Â  Â  while kill -0 $(< ${pidfile}) 2>/dev/null; do<br>
+  Â  Â  Â  Â  Â  Â  Â  kill -SIGTERM -$(< ${pidfile}) 2>/dev/null<br>
+  Â  Â  Â  Â  Â  Â  Â  sleep 1<br>
+  Â  Â  Â  Â  Â  Â  Â  # Kill processes if they are still running - may happen in interactive shells<br>
+  Â  Â  Â  Â  Â  Â  Â  ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill<br>
+  Â  Â  Â  Â  Â  done<br>
+  Â  Â  Â  Â  Â  rm  ${pidfile}<br>
+  Â  Â  Â  fi<br>
+  Â  done<br>
 }<br>
<br>
 function webserverStartAll()<br>
 {<br>
-  Â  Â  Â # do not start if toastermain points to a valid process<br>
-  Â  Â  Â if ! cat "${BUILDDIR}/.toastermain.pid" 2>/dev/null | xargs -I{} kill -0 {} ; then<br>
-  Â  Â  Â  Â  Â  retval=1<br>
-  Â  Â  Â  Â  Â  rm "${BUILDDIR}/.toastermain.pid"<br>
-  Â  Â  Â  fi<br>
+  Â  # do not start if toastermain points to a valid process<br>
+  Â  if ! cat "${BUILDDIR}/.toastermain.pid" 2>/dev/null | xargs -I{} kill -0 {} ; then<br>
+  Â  Â  Â  retval=1<br>
+  Â  Â  Â  rm "${BUILDDIR}/.toastermain.pid"<br>
+  Â  fi<br>
<br>
+  Â  retval=0<br>
+  Â  python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1<br>
+  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2<br>
+  Â  if [ $retval -eq 1 ]; then<br>
+  Â  Â  Â  echo "Failed db sync, stopping system start" 1>&2<br>
+  Â  elif [ $retval -eq 2 ]; then<br>
+  Â  Â  Â  echo -e "\nError on migration, trying to recover... \n"<br>
+  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm 0001_initial --fake<br>
  Â  Â  Â  Â retval=0<br>
-  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1<br>
-  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2<br>
-  Â  Â  Â  if [ $retval -eq 1 ]; then<br>
-  Â  Â  Â  Â  Â  Â  Â  echo "Failed db sync, stopping system start" 1>&2<br>
-  Â  Â  Â  elif [ $retval -eq 2 ]; then<br>
-  Â  Â  Â  Â  Â  echo -e "\nError on migration, trying to recover... \n"<br>
-  Â  Â  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm 0001_initial --fake<br>
-  Â  Â  Â  Â  Â  retval=0<br>
-  Â  Â  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1<br>
-  Â  Â  Â  fi<br>
-  Â  Â  Â if [ "$TOASTER_MANAGED" '==' '1' ]; then<br>
-  Â  Â  Â  Â  Â  Â  Â python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1<br>
-  Â  Â  Â  Â  Â  Â  Â python $BBBASEDIR/lib/toaster/manage.py checksettings  --traceback || retval=1<br>
-  Â  Â  Â fi<br>
-  Â  Â  Â  if [ $retval -eq 0 ]; then<br>
-  Â  Â  Â  Â  Â echo "Starting webserver..."<br>
-  Â  Â  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >>${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid<br>
-  Â  Â  Â  Â  Â  sleep 1<br>
-  Â  Â  Â  Â  Â  if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then<br>
-  Â  Â  Â  Â  Â  Â  Â  retval=1<br>
-  Â  Â  Â  Â  Â  Â  Â  rm "${BUILDDIR}/.toastermain.pid"<br>
-  Â  Â  Â  Â  Â else<br>
-  Â  Â  Â  Â  Â  Â  Â echo "Webserver address:  http://0.0.0.0:$WEB_PORT/"<br>
-  Â  Â  Â  Â  Â  fi<br>
+  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1<br>
+  Â  fi<br>
+  Â  if [ "$TOASTER_MANAGED" '==' '1' ]; then<br>
+  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1<br>
+  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py checksettings  --traceback || retval=1<br>
+  Â  fi<br>
+  Â  if [ $retval -eq 0 ]; then<br>
+  Â  Â  Â  echo "Starting webserver..."<br>
+  Â  Â  Â  python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >>${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid<br>
+  Â  Â  Â  sleep 1<br>
+  Â  Â  Â  if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then<br>
+  Â  Â  Â  Â  Â  retval=1<br>
+  Â  Â  Â  Â  Â  rm "${BUILDDIR}/.toastermain.pid"<br>
+  Â  Â  Â  else<br>
+  Â  Â  Â  Â  Â  echo "Webserver address:  http://0.0.0.0:$WEB_PORT/"<br>
  Â  Â  Â  Â fi<br>
-  Â  Â  Â  return $retval<br>
+  Â  fi<br>
+  Â  return $retval<br>
 }<br>
<br>
 # Helper functions to add a special configuration file<br>
<br>
 function addtoConfiguration()<br>
 {<br>
-  Â  Â  Â  file=$1<br>
-  Â  Â  Â  shift<br>
-  Â  Â  Â  echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file<br>
-  Â  Â  Â  for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done<br>
+  Â  file=$1<br>
+  Â  shift<br>
+  Â  echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file<br>
+  Â  for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done<br>
 }<br>
<br>
 INSTOPSYSTEM=0<br>
@@ -127,7 +127,7 @@ function notify_chldexit() {<br>
<br>
<br>
 function verify_prereq() {<br>
-  Â  Â  Â # Verify prerequisites<br>
+  Â  # Verify prerequisites<br>
<br>
  Â  Â if ! echo "import django; print (1,) == django.VERSION[0:1] and django.VERSION[1:2][0] in (6,)" | python 2>/dev/null | grep True >/dev/null; then<br>
  Â  Â  Â  Â echo -e "This program needs Django 1.6. Please install with\n\npip install django==1.6\n"<br>
@@ -174,25 +174,25 @@ if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then<br>
  Â  Â # Start just the web server, point the web browser to the interface, and start any Django services.<br>
<br>
  Â  Â if ! verify_prereq; then<br>
-  Â  Â  Â  echo -e "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2;<br>
-  Â  Â  Â  exit 1;<br>
+  Â  Â  Â  echo -e "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2<br>
+  Â  Â  Â  exit 1<br>
  Â  Â fi<br>
<br>
  Â  Â if [ -n "$BUILDDIR" ]; then<br>
-  Â  Â  Â echo -e "Error: It looks like you sourced oe-init-build-env. Toaster cannot start in build mode from an oe-core build environment.\n You should be starting Toaster from a new terminal window." 1>&2;<br>
-  Â  Â  Â  exit 1;<br>
+  Â  Â  Â  echo -e "Error: It looks like you sourced oe-init-build-env. Toaster cannot start in build mode from an oe-core build environment.\n You should be starting Toaster from a new terminal window." 1>&2<br>
+  Â  Â  Â  exit 1<br>
  Â  Â fi<br>
<br>
  Â  Â if ! which daemon >/dev/null 2>&1; then<br>
-  Â  Â  Â  echo -e "Failed dependency; toaster needs the 'daemon' program in order to be able to start builds'. Please install the 'daemon' program from your distribution repositories or <a href="http://www.libslack.org/daemon/" target="_blank">http://www.libslack.org/daemon/</a>" 1>&2;<br>
-  Â  Â  Â exit 1;<br>
+  Â  Â  Â  echo -e "Failed dependency; toaster needs the 'daemon' program in order to be able to start builds'. Please install the 'daemon' program from your distribution repositories or <a href="http://www.libslack.org/daemon/" target="_blank">http://www.libslack.org/daemon/</a>" 1>&2<br>
+  Â  Â  Â  exit 1<br>
  Â  Â fi<br>
<br>
  Â  Â # Define a fake builddir where only the pid files are actually created. No real builds will take place here.<br>
  Â  Â BUILDDIR=/tmp/toaster_$$<br>
  Â  Â if [ -d "$BUILDDIR" ]; then<br>
  Â  Â  Â  Â echo -e "Previous toaster run directory $BUILDDIR found, cowardly refusing to start. Please remove the directory when that toaster instance is over" 2>&1<br>
-  Â  Â  Â  exit 1;<br>
+  Â  Â  Â  exit 1<br>
  Â  Â fi<br>
<br>
  Â  Â mkdir -p "$BUILDDIR"<br>
@@ -219,14 +219,14 @@ if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then<br>
  Â  Â  Â  Â else<br>
  Â  Â  Â  Â  Â  Â echo "No errors found, removing the run directory '$BUILDDIR'"<br>
  Â  Â  Â  Â  Â  Â do_cleanup<br>
-  Â  Â  Â  fi;<br>
+  Â  Â  Â  fi<br>
  Â  Â }<br>
  Â  Â TOASTER_MANAGED=1<br>
  Â  Â export TOASTER_MANAGED=1<br>
  Â  Â if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then<br>
-  Â  Â  Â  echo "Failed to start the web server, stopping" 1>&2;<br>
+  Â  Â  Â  echo "Failed to start the web server, stopping" 1>&2<br>
  Â  Â  Â  Â cleanup<br>
-  Â  Â  Â  exit 1;<br>
+  Â  Â  Â  exit 1<br>
  Â  Â fi<br>
  Â  Â if [ $WEBSERVER -gt 0 ]; then<br>
  Â  Â  Â  Â echo "Starting browser..."<br>
@@ -245,14 +245,14 @@ fi<br>
<br>
<br>
 if ! verify_prereq; then<br>
-  Â  Â  Â echo -e "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2;<br>
-  Â  Â  Â return 1;<br>
+  Â  echo -e "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2<br>
+  Â  return 1<br>
 fi<br>
<br>
<br>
 # We make sure we're running in the current shell and in a good environment<br>
 if [ -z "$BUILDDIR" ] ||  ! which bitbake >/dev/null 2>&1 ; then<br>
-  Â  echo "Error: Build environment is not setup or bitbake is not in path." 1>&2;<br>
+  Â  echo "Error: Build environment is not setup or bitbake is not in path." 1>&2<br>
  Â  Â return 2<br>
 fi<br>
<br>
@@ -265,7 +265,7 @@ else<br>
  Â  Â  Â  Â CMD="start"<br>
  Â  Â else<br>
  Â  Â  Â  Â CMD="stop"<br>
-  Â  fi;<br>
+  Â  fi<br>
 fi<br>
<br>
 echo "The system will $CMD."<br>
@@ -303,7 +303,7 @@ case $CMD in<br>
  Â  Â  Â  Â unset BBSERVER<br>
  Â  Â  Â  Â PREREAD=""<br>
  Â  Â  Â  Â if [ -e ${BUILDDIR}/conf/toaster-pre.conf ]; then<br>
-  Â  Â  Â  Â  Â  Â  Â rm ${BUILDDIR}/conf/toaster-pre.conf<br>
+  Â  Â  Â  Â  Â  rm ${BUILDDIR}/conf/toaster-pre.conf<br>
  Â  Â  Â  Â fi<br>
  Â  Â  Â  Â bitbake $PREREAD --postread conf/toaster.conf --server-only -t xmlrpc -B <a href="http://0.0.0.0:0" target="_blank">0.0.0.0:0</a><br>
  Â  Â  Â  Â if [ $? -ne 0 ]; then<br>
@@ -337,4 +337,3 @@ case $CMD in<br>
  Â  Â ;;<br>
 esac<br>
<br>
-<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.4<br>
<br>
--<br>
_______________________________________________<br>
toaster mailing list<br>
<a href="mailto:toaster@yoctoproject.org">toaster@yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/toaster" target="_blank">https://lists.yoctoproject.org/listinfo/toaster</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alex Damian<div>Yocto Project<br></div><div>SSG / OTC </div></div></div>
</div>