Fix for 8279
cover Fix for 8279
Hi,
This patchset unifies the way toaster runs bitbake in analysis and managed modes.
The following changes since commit 4220ebce223fa7cd0865c793b7dd3ffe07b8e130:
toaster: Special case the openembedded-core layer to avoid duplicates (2015-09-30 15:12:40 +0300)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ed/toaster/8279
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/8279
Ed Bartosh (4):
toaster: run bitbake --server-only differently
toaster: run bitbake --observe-only differently
toaster: implement get-dburl command
toaster: set DATABASE_URL in toaster script
bitbake/bin/toaster | 11 +++++------ .../lib/toaster/toastermain/management/commands/get-dburl.py | 9 +++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
--
Regards,
Ed
PATCH 1/4 toaster: run bitbake --server-only differently
Run bitbake --server-only similar way in analisys and build mode:
bitbake --read toaster-pre.conf --postread toaster.conf \
--server-only -t xmlrpc -B 0.0.0.0:0Created empty toaster-pre.conf to support this.
This is a first step in unifying the way bitbake is run by toaster.
[YOCTO #8279]
--- bitbake/bin/toaster | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
bitbake/bin/toaster +2 -5
@@ -309,16 +309,13 @@ case $CMD in start ) start_success=1 addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE + echo "" > ${BUILDDIR}/conf/toaster-pre.conf if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then echo "Failed ${CMD}." return 4 fi unset BBSERVER - PREREAD="" - if [ -e ${BUILDDIR}/conf/toaster-pre.conf ]; then - rm ${BUILDDIR}/conf/toaster-pre.conf - fi - bitbake $PREREAD --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 + bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 if [ $? -ne 0 ]; then start_success=0 echo "Bitbake server start failed"
Signature · 1 line
2.1.4
PATCH 2/4 toaster: run bitbake --observe-only differently
In reply to Ed BartoshRun bitbake --observe-only similar way in analysis and build mode:
bitbake --observe-only -u toasterui \
--remote-server=$BBSERVER -t xmlrpc
[YOCTO #8279]
--- bitbake/bin/toaster | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
bitbake/bin/toaster +2 -1
@@ -322,7 +322,8 @@ case $CMD in else export BBSERVER=0.0.0.0:-1 if [ $NOTOASTERUI -eq 0 ]; then # we start the TOASTERUI only if not inhibited - bitbake --observe-only -u toasterui >>${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid + bitbake --observe-only -u toasterui --remote-server=$BBSERVER -t xmlrpc >>${BUILDDIR}/toaster_ui.log 2>&1 \ + & echo $! >${BUILDDIR}/.toasterui.pid fi fi if [ $start_success -eq 1 ]; then
Signature · 1 line
2.1.4
PATCH 3/4 toaster: implement get-dburl command
In reply to Ed BartoshImplemented management command to call getDATABASE_URL API. It will be used to get database url from toaster shell script by running 'manage.py get-dburl'
--- bitbake/lib/toaster/toastermain/management/commands/get-dburl.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
bitbake/lib/toaster/toastermain/management/commands/get-dburl.py new file +9 -0
@@ -0,0 +1,9 @@ +from toastermain.settings import getDATABASE_URL +from django.core.management.base import NoArgsCommand + +class Command(NoArgsCommand): + args = "" + help = "get database url" + + def handle_noargs(self,**options): + print getDATABASE_URL()
Signature · 1 line
2.1.4
PATCH 4/4 toaster: set DATABASE_URL in toaster script
In reply to Ed BartoshSet environment variable DATABASE_URL in bitbake/bit/toaster Variable value is obtained by running 'manage.py get-dburl'
[YOCTO #8279]
--- bitbake/bin/toaster | 1 + 1 file changed, 1 insertion(+)
bitbake/bin/toaster +1 -0
@@ -321,6 +321,7 @@ case $CMD in echo "Bitbake server start failed" else export BBSERVER=0.0.0.0:-1 + export DATABASE_URL=`$BBBASEDIR/lib/toaster/manage.py get-dburl` if [ $NOTOASTERUI -eq 0 ]; then # we start the TOASTERUI only if not inhibited bitbake --observe-only -u toasterui --remote-server=$BBSERVER -t xmlrpc >>${BUILDDIR}/toaster_ui.log 2>&1 \ & echo $! >${BUILDDIR}/.toasterui.pid
Signature · 1 line
2.1.4