All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix for 8279
@ 2015-10-01 12:55 Ed Bartosh
  2015-10-01 12:55 ` [PATCH 1/4] toaster: run bitbake --server-only differently Ed Bartosh
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ed Bartosh @ 2015-10-01 12:55 UTC (permalink / raw)
  To: toaster

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] toaster: run bitbake --server-only differently
  2015-10-01 12:55 [PATCH 0/4] Fix for 8279 Ed Bartosh
@ 2015-10-01 12:55 ` Ed Bartosh
  2015-10-01 12:55 ` [PATCH 2/4] toaster: run bitbake --observe-only differently Ed Bartosh
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2015-10-01 12:55 UTC (permalink / raw)
  To: toaster

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:0

Created empty toaster-pre.conf to support this.

This is a first step in unifying the way bitbake is
run by toaster.

[YOCTO #8279]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 bitbake/bin/toaster | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index ac27826..945dcf1 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -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"
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] toaster: run bitbake --observe-only differently
  2015-10-01 12:55 [PATCH 0/4] Fix for 8279 Ed Bartosh
  2015-10-01 12:55 ` [PATCH 1/4] toaster: run bitbake --server-only differently Ed Bartosh
@ 2015-10-01 12:55 ` Ed Bartosh
  2015-10-01 12:55 ` [PATCH 3/4] toaster: implement get-dburl command Ed Bartosh
  2015-10-01 12:55 ` [PATCH 4/4] toaster: set DATABASE_URL in toaster script Ed Bartosh
  3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2015-10-01 12:55 UTC (permalink / raw)
  To: toaster

Run bitbake --observe-only similar way in analysis and
build mode:
       bitbake --observe-only -u toasterui \
           --remote-server=$BBSERVER -t xmlrpc

[YOCTO #8279]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 bitbake/bin/toaster | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 945dcf1..0cb3c7c 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] toaster: implement get-dburl command
  2015-10-01 12:55 [PATCH 0/4] Fix for 8279 Ed Bartosh
  2015-10-01 12:55 ` [PATCH 1/4] toaster: run bitbake --server-only differently Ed Bartosh
  2015-10-01 12:55 ` [PATCH 2/4] toaster: run bitbake --observe-only differently Ed Bartosh
@ 2015-10-01 12:55 ` Ed Bartosh
  2015-10-01 12:55 ` [PATCH 4/4] toaster: set DATABASE_URL in toaster script Ed Bartosh
  3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2015-10-01 12:55 UTC (permalink / raw)
  To: toaster

Implemented 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'

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 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

diff --git a/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py b/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
new file mode 100644
index 0000000..22b3eb7
--- /dev/null
+++ b/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
@@ -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()
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] toaster: set DATABASE_URL in toaster script
  2015-10-01 12:55 [PATCH 0/4] Fix for 8279 Ed Bartosh
                   ` (2 preceding siblings ...)
  2015-10-01 12:55 ` [PATCH 3/4] toaster: implement get-dburl command Ed Bartosh
@ 2015-10-01 12:55 ` Ed Bartosh
  3 siblings, 0 replies; 5+ messages in thread
From: Ed Bartosh @ 2015-10-01 12:55 UTC (permalink / raw)
  To: toaster

Set environment variable DATABASE_URL in bitbake/bit/toaster
Variable value is obtained by running 'manage.py get-dburl'

[YOCTO #8279]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 bitbake/bin/toaster | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 0cb3c7c..7093aa7 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-01 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01 12:55 [PATCH 0/4] Fix for 8279 Ed Bartosh
2015-10-01 12:55 ` [PATCH 1/4] toaster: run bitbake --server-only differently Ed Bartosh
2015-10-01 12:55 ` [PATCH 2/4] toaster: run bitbake --observe-only differently Ed Bartosh
2015-10-01 12:55 ` [PATCH 3/4] toaster: implement get-dburl command Ed Bartosh
2015-10-01 12:55 ` [PATCH 4/4] toaster: set DATABASE_URL in toaster script Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.