remove startup questions v2
cover remove startup questions v2
This is v2 of my easier startup patch. I addressed most of Ed's comments.
This one ,
splits into more commits. The checksettings commit is still big but would take a fair amount of time to break into anything that would run separately.
did some pylint fixes.
check for the config file and exits if missing.
made some code more explicit.
got rid of most of the trailing white spaces (one is not in the git tree but is in the patch. no idea why)
-b
The following changes since commit af1e3160922a30b8a538959335a5f8945f2f3549:
toaster: Remove project name from latest project builds (2015-10-02 14:44:14 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib bavery/toaster/startup_simplification_8217_v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/startup_simplification_8217_v2
brian avery (4):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrol
bitbake/bin/toaster | 38 +++++- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 107 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 toaster: removed superuser question from startup
added comment explaining how to create one later
--- bitbake/bin/toaster | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
bitbake/bin/toaster +4 -5
@@ -54,11 +54,10 @@ webserverStartAll() fi retval=0 - if [ "$TOASTER_MANAGED" '=' '1' ]; then - python $BBBASEDIR/lib/toaster/manage.py syncdb || retval=1 - else - python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1 - fi + # you can always add a superuser later via + # python bitbake/lib/toaster/manage.py python manage.py createsuperuser --username=<ME> + python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1 + python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2 if [ $retval -eq 1 ]; then echo "Failed db sync, stopping system start" 1>&2
Signature · 1 line
1.9.1
PATCH 2/4 toaster: remove layer and build dir interactive questions
added TOASTER_CONF env var for toaasterconf.json
added TOASTER_DIR env var for working dir
added bugfix so WEB_PORT env variable is honored
--- bitbake/bin/toaster | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
bitbake/bin/toaster +24 -1
@@ -162,7 +162,30 @@ RUNNING=0 NOTOASTERUI=0 WEBSERVER=1 TOASTER_BRBE="" -WEB_PORT="8000" +if [ "$WEB_PORT" == "" ]; then + WEB_PORT="8000" +fi +# this is the configuraton file we are using for toaster +# note default is assuming yocto. Override this if you are +# running in a pure OE environment and use the toasterconf.json +# in meta/conf/toasterconf.json +# note: for future there are a number of relative path assumptions +# in the local layers that currently prevent using an arbitrary +# toasterconf.json +if [ "$TOASTER_CONF" == "" ]; then + BIN_DIR=$(dirname "${BASH_SOURCE[0]}") + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" +fi +# 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 TOASTER_DIR=`pwd` + + NOBROWSER=0 for param in $*; do
Signature · 1 line
1.9.1
PATCH 3/4 toaster: check for configuration file and exit if not found
In reply to brian avery[YOCTO #8217]
--- bitbake/bin/toaster | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
bitbake/bin/toaster +5 -1
@@ -174,7 +174,11 @@ fi # toasterconf.json if [ "$TOASTER_CONF" == "" ]; then BIN_DIR=$(dirname "${BASH_SOURCE[0]}") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" +fi +if [ ! -f $TOASTER_CONF ]; then + echo "$TOASTER_CONF configuration file not found, exiting..." + exit -1 fi # this defines the dir toaster will use for # 1) clones of layers (in _toaster_clones )
Signature · 1 line
1.9.1
PATCH 4/4 toaster: get rid of interactivity in bldcontrol
In reply to brian averyremoved layer dir questions and base off TOASTER_DIR
removed build dir questions and base off TOASTER_DIR
base configuration file off of TOASTER_CONF
fixed some pylint issues
[YOCTO #8217]
--- bitbake/bin/toaster | 2 +- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 38 insertions(+), 102 deletions(-)
bitbake/bin/toaster +1 -1
@@ -174,7 +174,7 @@ fi # toasterconf.json if [ "$TOASTER_CONF" == "" ]; then BIN_DIR=$(dirname "${BASH_SOURCE[0]}") - export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" + export TOASTER_CONF="$BIN_DIR/../../meta-yocto/conf/toasterconf.json" fi if [ ! -f $TOASTER_CONF ]; then echo "$TOASTER_CONF configuration file not found, exiting..."
bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py +37 -101
209 lines not on this page · raw message
Signature · 1 line
1.9.1
The patchset looks good to me.
Quoted 43 lines · brian avery
This is v2 of my easier startup patch. I addressed most of Ed's comments.
This one ,
splits into more commits. The checksettings commit is still big but would take a fair amount of time to break into anything that would run separately.did some pylint fixes.
check for the config file and exits if missing.
made some code more explicit.
got rid of most of the trailing white spaces (one is not in the git tree but is in the patch. no idea why)
-b
The following changes since commit
af1e3160922a30b8a538959335a5f8945f2f3549:toaster: Remove project name from latest project builds (2015-10-02 14:44:14 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contribbavery/toaster/startup_simplification_8217_v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/startup_simplification_8217_v2brian avery (4):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrolbitbake/bin/toaster | 38 +++++- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 107 deletions(-)Signature · 7 lines
1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
-- Regards, Ed
Quoted 1 line · On 05/10/2015 09:21, "[email protected] on behalf of Ed…
The patchset looks good to me.
It might be just me doing something wrong, but when I try to start Toaster with these patches applied (on top of master and with an existing database), I get this message in the terminal:
bitbake/bin/toaster: 165: [: unexpected operator
bitbake/bin/toaster: 175: [: unexpected operator
and this message in the toaster_web log
CommandError: "0.0.0.0:" is not a valid port number or address:port pair.
If I am doing something silly, let me know.
Thanks!
Belén
Quoted 66 lines
Acked-by Ed Bartosh <[email protected]>Quoted 52 lines · brian avery
This is v2 of my easier startup patch. I addressed most of Ed's comments.
This one ,
splits into more commits. The checksettings commit is still big but would take a
fair amount of time to break into anything that would run separately.did some pylint fixes.
check for the config file and exits if missing.
made some code more explicit.
got rid of most of the trailing white spaces (one is not in the git tree but is in the patch. no idea why)
-b
The following changes since commit
af1e3160922a30b8a538959335a5f8945f2f3549:toaster: Remove project name from latest project builds (2015-10-02
14:44:14 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contrib
bavery/toaster/startup_simplification_8217_v2http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/s
tartup_simplification_8217_v2brian avery (4):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrolbitbake/bin/toaster | 38 +++++- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 107 deletions(-)Signature · 7 lines
1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toasterSignature · 8 lines
-- Regards, Ed -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Sent too soon: if I try to start Toaster when a db doesn't exist, I get this trace
Importing file: None
Failure while trying to import the toaster config file None: coercing to
Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
File
"/home/yocto/master/bitbake/lib/toaster/bldcontrol/management/commands/chec ksettings.py", line 110, in _verify_be
LoadConfigCommand()._import_layer_config(config_file)
File
"/home/yocto/master/bitbake/lib/toaster/bldcontrol/management/commands/load conf.py", line 38, in _import_layer_config
if not os.path.exists(filepath) or not os.path.isfile(filepath):
File "/usr/lib/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found Starting webserver...
Failed to start the web server, stopping
The toaster_web.log once again says
CommandError: "0.0.0.0:" is not a valid port number or address:port pair.
Cheers
Belén
Quoted 95 lines · Belen
Quoted 1 line · On 05/10/2015 09:21, "[email protected] on behalf of Ed…
The patchset looks good to me.
It might be just me doing something wrong, but when I try to start Toaster with these patches applied (on top of master and with an existing database), I get this message in the terminal:
bitbake/bin/toaster: 165: [: unexpected operator
bitbake/bin/toaster: 175: [: unexpected operatorand this message in the
toaster_weblogCommandError: "0.0.0.0:" is not a valid port number or address:port pair.
If I am doing something silly, let me know.
Thanks!
Belén
Quoted 67 lines
Acked-by Ed Bartosh <[email protected]>Quoted 53 lines · brian avery
This is v2 of my easier startup patch. I addressed most of Ed's comments.
This one ,
splits into more commits. The checksettings commit is still big but would take a
fair amount of time to break into anything that would run separately.did some pylint fixes.
check for the config file and exits if missing.
made some code more explicit.
got rid of most of the trailing white spaces (one is not in the git tree but is in the patch. no idea why)
-b
The following changes since commit
af1e3160922a30b8a538959335a5f8945f2f3549:toaster: Remove project name from latest project builds (2015-10-02
14:44:14 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contrib
bavery/toaster/startup_simplification_8217_v2http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/
startup_simplification_8217_v2brian avery (4):
toaster: removed superuser question from startup
toaster: remove layer and build dir interactive questions
toaster: check for configuration file and exit if not found
toaster: get rid of interactivity in bldcontrolbitbake/bin/toaster | 38 +++++- .../management/commands/checksettings.py | 138 ++++++--------------- 2 files changed, 69 insertions(+), 107 deletions(-)Signature · 7 lines
1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toasterSignature · 8 lines
-- Regards, Ed -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster