toaster.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] toaster: allow builddir to be named other than build bug 9992 V2
@ 2017-02-07 20:36 brian avery
  2017-02-07 20:36 ` [PATCH 1/3] toaster: put runbuilds output into a log file brian avery
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: brian avery @ 2017-02-07 20:36 UTC (permalink / raw)
  To: toaster; +Cc: brian avery

This pattchset fixes two bugs. The most important of which is in the sublject line.

9992 -> if we do oe-init-build-env cow, toaster would fail because it had the directory
name build hardcoded for toaster.sqlite.  This patch moves the toaster.sqlite database to
TOASTER_DIR so that you can name your builddir whatever you'd like to.

11006-> the runbuilds process was printing out alot of debug and status messages to the
console.  Since the console can also be used to run cli builds while toaster displays
their status, this was quite disconcerting.  This patch redirects the output to
toaster_runbuilds.log.

-brian avery

The following changes since commit a624cf7f95c8cf4ff764cc997fd1db4601b97dcc:

  oeqa/selftest/pkgdata: use m4 instead of bash (2017-02-07 14:50:10 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib bavery/toaster/9992-builddir-not-buildV5
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/9992-builddir-not-buildV5

brian avery (3):
  toaster: put runbuilds output into a log file
  toaster: move sqlite database to TOASTER_DIR
  toaster: remove cut and paste cruft

 bitbake/bin/toaster                         | 19 ++++++-------------
 bitbake/lib/toaster/toastermain/settings.py |  3 +--
 2 files changed, 7 insertions(+), 15 deletions(-)

--
1.9.1


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

* [PATCH 1/3] toaster: put runbuilds output into a log file
  2017-02-07 20:36 [PATCH 0/3] toaster: allow builddir to be named other than build bug 9992 V2 brian avery
@ 2017-02-07 20:36 ` brian avery
  2017-02-07 20:36 ` [PATCH 2/3] toaster: move sqlite database to TOASTER_DIR brian avery
  2017-02-07 20:36 ` [PATCH 3/3] toaster: remove cut and paste cruft brian avery
  2 siblings, 0 replies; 4+ messages in thread
From: brian avery @ 2017-02-07 20:36 UTC (permalink / raw)
  To: toaster; +Cc: brian avery

The output from runbuilds should not spout over the
console where you would be running cmdline builds.
Redirected to TOASTER_DIR/toaster_runbuilds.log.

[YOCTO #11006]

Signed-off-by: brian avery <brian.avery@intel.com>
---
 bitbake/bin/toaster | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index daaf8ea..37a1116 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -255,7 +255,10 @@ case $CMD in
             return 4
         fi
         export BITBAKE_UI='toasterui'
-        $MANAGE runbuilds &
+        $MANAGE runbuilds \
+           </dev/null >>${BUILDDIR}/toaster_runbuilds.log 2>&1 \
+           & echo $! >${BUILDDIR}/.runbuilds.pid
+
         # set fail safe stop system on terminal exit
         trap stop_system SIGHUP
         echo "Successful ${CMD}."
-- 
1.9.1



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

* [PATCH 2/3] toaster: move sqlite database to TOASTER_DIR
  2017-02-07 20:36 [PATCH 0/3] toaster: allow builddir to be named other than build bug 9992 V2 brian avery
  2017-02-07 20:36 ` [PATCH 1/3] toaster: put runbuilds output into a log file brian avery
@ 2017-02-07 20:36 ` brian avery
  2017-02-07 20:36 ` [PATCH 3/3] toaster: remove cut and paste cruft brian avery
  2 siblings, 0 replies; 4+ messages in thread
From: brian avery @ 2017-02-07 20:36 UTC (permalink / raw)
  To: toaster; +Cc: brian avery

The toaster.sqlite database was located in TOASTER_DIR/build.  This
meant that if you named your build directory something else (like cow),
Toaster would fail to make/find the database.  TOASTER_DIR is on the
whitelist unlike BUILDDIR and we need to be able to write there anyway
given our current layout so this should not disrupt anything.

[YOCTO #9992]

Signed-off-by: brian avery <brian.avery@intel.com>
---
 bitbake/lib/toaster/toastermain/settings.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index aec9dbb..1fd649c 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -38,8 +38,7 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
-TOASTER_SQLITE_DEFAULT_DIR = os.path.join(os.environ.get('TOASTER_DIR', ''),
-                                          'build')
+TOASTER_SQLITE_DEFAULT_DIR = os.environ.get('TOASTER_DIR')
 
 DATABASES = {
     'default': {
-- 
1.9.1



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

* [PATCH 3/3] toaster: remove cut and paste cruft
  2017-02-07 20:36 [PATCH 0/3] toaster: allow builddir to be named other than build bug 9992 V2 brian avery
  2017-02-07 20:36 ` [PATCH 1/3] toaster: put runbuilds output into a log file brian avery
  2017-02-07 20:36 ` [PATCH 2/3] toaster: move sqlite database to TOASTER_DIR brian avery
@ 2017-02-07 20:36 ` brian avery
  2 siblings, 0 replies; 4+ messages in thread
From: brian avery @ 2017-02-07 20:36 UTC (permalink / raw)
  To: toaster; +Cc: brian avery

There was a superfluous section in toaster start/stop script that was
setting the TOASTER_DIR and had a set of comments around that setting.
This was done in two places and only the last one was effective. This
patch removes the spurious section to make it clearer what was
happening and what TOASTER_DIR was actually getting set to.

Signed-off-by: brian avery <brian.avery@intel.com>
---
 bitbake/bin/toaster | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 37a1116..fd6cabf 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -151,15 +151,7 @@ fi
 
 unset OE_ROOT
 
-# this defines the dir toaster will use for
-# 1) clones of layers (in _toaster_clones )
-# 2) the build dir (in build)
-# 3) the sqlite db if that is being used.
-# 4) pid's we need to clean up on exit/shutdown
-# note: for future. in order to make this an arbitrary directory, we need to
-# make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
-export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR"
-export TOASTER_DIR=`pwd`
+
 
 WEBSERVER=1
 ADDR_PORT="localhost:8000"
@@ -215,10 +207,8 @@ fi
 # 2) the build dir (in build)
 # 3) the sqlite db if that is being used.
 # 4) pid's we need to clean up on exit/shutdown
-# note: for future. in order to make this an arbitrary directory, we need to
-# make sure that the toaster.sqlite file doesn't default to `pwd`
-# like it currently does.
 export TOASTER_DIR=`dirname $BUILDDIR`
+export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE TOASTER_DIR"
 
 # Determine the action. If specified by arguments, fine, if not, toggle it
 if [ "$CMD" = "start" ] ; then
-- 
1.9.1



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

end of thread, other threads:[~2017-02-07 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07 20:36 [PATCH 0/3] toaster: allow builddir to be named other than build bug 9992 V2 brian avery
2017-02-07 20:36 ` [PATCH 1/3] toaster: put runbuilds output into a log file brian avery
2017-02-07 20:36 ` [PATCH 2/3] toaster: move sqlite database to TOASTER_DIR brian avery
2017-02-07 20:36 ` [PATCH 3/3] toaster: remove cut and paste cruft brian avery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).