Skip to contentSkip to conversation

small improvements to startup, upgrade to latest Django 1.6

PATCH In review brian avery 3 participants 6 messages Sep 23, 2015 – Sep 28, 2015

lore
Share & tools
lore
#0 lore raw

cover small improvements to startup, upgrade to latest Django 1.6

This eliminates the question about making a superuser on startup in managed mode. It also uses the value of WEB_PORT if defined in analysis mode.
It upgrades requirements.txt to the latest Django 1.6 (which I've been running for awhile).

-b

The following changes since commit 9f66aa1a11b5b45280aa41bf4517ec56ee5f2ab2:

bitbake: toaster: start script warning text formatting small improvement (2015-09-23 22:44:56 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib bavery/toaster/small-script-improvement
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/small-script-improvement

brian avery (2):
toaster: small improvements to the startup script
toaster: change requuirements.txt to get the latest 1.6 django version

 bitbake/bin/toaster              | 12 ++++++------
 bitbake/toaster-requirements.txt |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 toaster: small improvements to the startup script

Do not ask th user to create a superuser on running in managed mode

Correctly inherit the env variable WEB_PORT if set in analysis mode

---
 bitbake/bin/toaster | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
bitbake/bin/toaster +6 -6
index ac27826..2153282 100755
@@ -54,11 +54,9 @@ 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
@@ -163,7 +161,9 @@ RUNNING=0
 NOTOASTERUI=0
 WEBSERVER=1
 TOASTER_BRBE=""
-WEB_PORT="8000"
+if [ "WEB_PORT" == "" ]; then
+    WEB_PORT="8000"
+fi
 NOBROWSER=0
 
 for param in $*; do
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 toaster: change requuirements.txt to get the latest 1.6 django version

getting the latest 1.6 available gives us the most bug fixes

---
 bitbake/toaster-requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/toaster-requirements.txt +1 -1
index c4a2221..358e662 100644
@@ -1,4 +1,4 @@
-Django==1.6
+Django<1.7
 South==0.8.4
 argparse==1.2.1
 wsgiref==0.1.2
Signature · 1 line
1.9.1
#3 lore raw
In reply to brian avery
Quoted 6 lines · brian avery

This eliminates the question about making a superuser on startup in managed mode.
It also uses the value of WEB_PORT if defined in analysis mode. It upgrades requirements.txt to the latest Django 1.6 (which I've been running for awhile).

Looks good to me, sent upstream.

Elliot

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
#4 lore raw
In reply to brian avery
Quoted 14 lines · On 24/09/2015 00:07, "[email protected] on behalf of brian…

This eliminates the question about making a superuser on startup in managed mode.
It also uses the value of WEB_PORT if defined in analysis mode. It upgrades requirements.txt to the latest Django 1.6 (which I've been running for awhile).

-b

The following changes since commit
9f66aa1a11b5b45280aa41bf4517ec56ee5f2ab2:

bitbake: toaster: start script warning text formatting small
improvement (2015-09-23 22:44:56 +0100)

Quoted 7 lines

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib
bavery/toaster/small-script-improvement

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/sm
all-script-improvement

I think this is already sent to bitbake-devel, but using this brach the web server failed to start (managed mode). The toaster_web.log file says:

CommandError: "0.0.0.0:" is not a valid port number or address:port pair.

I am using sqlite.

Cheers

Belén

Quoted 17 lines

brian avery (2):
toaster: small improvements to the startup script
toaster: change requuirements.txt to get the latest 1.6 django version

bitbake/bin/toaster | 12 ++++++------
bitbake/toaster-requirements.txt | 2 +-

2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 7 lines
1.9.1

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster
#5 lore raw

My bad. I tend to start with webport=800x which obscured the bug. I'll submit a fix tonite. you can use webport=8000 as wa workaround in the meantime.

-b

Quoted 56 lines · Belen
Quoted 14 lines · On 24/09/2015 00:07, "[email protected] on behalf of brian…

This eliminates the question about making a superuser on startup in managed mode.
It also uses the value of WEB_PORT if defined in analysis mode. It upgrades requirements.txt to the latest Django 1.6 (which I've been running for awhile).

-b

The following changes since commit
9f66aa1a11b5b45280aa41bf4517ec56ee5f2ab2:

bitbake: toaster: start script warning text formatting small
improvement (2015-09-23 22:44:56 +0100)

Quoted 7 lines

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib
bavery/toaster/small-script-improvement

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/toaster/sm
all-script-improvement

I think this is already sent to bitbake-devel, but using this brach the web server failed to start (managed mode). The toaster_web.log file says:

CommandError: "0.0.0.0:" is not a valid port number or address:port pair.

I am using sqlite.

Cheers

Belén

Quoted 17 lines

brian avery (2):
toaster: small improvements to the startup script
toaster: change requuirements.txt to get the latest 1.6 django version

bitbake/bin/toaster | 12 ++++++------
bitbake/toaster-requirements.txt | 2 +-

2 files changed, 7 insertions(+), 7 deletions(-)

--
1.9.1

--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster