[bitbake-devel] [PATCH 07/11] toaster: remove addtoConfiguration function

Elliot Smith elliot.smith at intel.com
Thu Dec 17 16:48:52 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

This function is useless as it's called just once
and makes code less readable.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bin/toaster | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/bin/toaster b/bin/toaster
index 40c3c35..97ca177 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -83,16 +83,6 @@ webserverStartAll()
     return $retval
 }
 
-# Helper functions to add a special configuration file
-
-addtoConfiguration()
-{
-    file=$1
-    shift
-    echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file
-    for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done
-}
-
 INSTOPSYSTEM=0
 
 # define the stop command
@@ -339,7 +329,12 @@ fi
 
 case $CMD in
     start )
-        addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE
+        # Create configuration file
+        conf=${BUILDDIR}/conf/toaster.conf
+        echo "# Created by toaster start script" > $conf
+        echo "INHERIT+=\"toaster buildhistory\"" >> $conf
+        [ -n "$TOASTER_BRBE" ] && echo $TOASTER_BRBE >> $conf
+
         if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
             echo "Failed ${CMD}."
             return 4
-- 
1.9.3

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the bitbake-devel mailing list