summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/toaster19
-rw-r--r--bitbake/toaster-requirements.txt4
2 files changed, 15 insertions, 8 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 1f90362b1f..ce16de6c3b 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -63,9 +63,11 @@ function webserverStartAll()
63 retval=0 63 retval=0
64 python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1 64 python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1
65 fi 65 fi
66 python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1 66 if [ "x$TOASTER_MANAGED" == "x1" ]; then
67 python $BBBASEDIR/lib/toaster/manage.py checksettings || retval=1 67 python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1
68 68 python $BBBASEDIR/lib/toaster/manage.py checksettings || retval=1
69 fi
70 echo "Starting webserver"
69 if [ $retval -eq 0 ]; then 71 if [ $retval -eq 0 ]; then
70 python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid 72 python $BBBASEDIR/lib/toaster/manage.py runserver 0.0.0.0:8000 </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
71 sleep 1 73 sleep 1
@@ -128,8 +130,8 @@ if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; th
128 # Start just the web server, point the web browser to the interface, and start any Django services. 130 # Start just the web server, point the web browser to the interface, and start any Django services.
129 131
130 if [ -n "$BUILDDIR" ]; then 132 if [ -n "$BUILDDIR" ]; then
131 echo "Error: build/ directory detected. Standalone Toaster will not start in a build environment." 1>&2; 133 echo -e "Error: build/ directory detected. Toaster will not start in managed mode if a build environment is detected.\nUse a clean terminal to start Toaster." 1>&2;
132 return 1; 134 exit 1;
133 fi 135 fi
134 136
135 # Define a fake builddir where only the pid files are actually created. No real builds will take place here. 137 # Define a fake builddir where only the pid files are actually created. No real builds will take place here.
@@ -140,6 +142,7 @@ if [ -z "$ZSH_NAME" ] && [ `basename \"$0\"` = `basename \"$BASH_SOURCE\"` ]; th
140 webserverKillAll 142 webserverKillAll
141 RUNNING=0 143 RUNNING=0
142 } 144 }
145 TOASTER_MANAGED=1
143 export TOASTER_MANAGED=1 146 export TOASTER_MANAGED=1
144 webserverStartAll || (echo "Fail to start the web server, stopping" 1>&2 && exit 1) 147 webserverStartAll || (echo "Fail to start the web server, stopping" 1>&2 && exit 1)
145 xdg-open http://0.0.0.0:8000/ >/dev/null 2>&1 & 148 xdg-open http://0.0.0.0:8000/ >/dev/null 2>&1 &
@@ -163,13 +166,13 @@ fi
163 166
164# Verify prerequisites 167# Verify prerequisites
165 168
166if ! echo "import django; print (1,5) == django.VERSION[0:2]" | python 2>/dev/null | grep True >/dev/null; then 169if ! echo "import django; print (1,) == django.VERSION[0:1] and django.VERSION[1:2][0] in (5,6)" | python 2>/dev/null | grep True >/dev/null; then
167 echo -e "This program needs Django 1.5. Please install with\n\nsudo pip install django==1.5" 170 echo -e "This program needs Django 1.5 or 1.6. Please install with\n\npip install django==1.6"
168 return 2 171 return 2
169fi 172fi
170 173
171if ! echo "import south; print [0,8,4] == map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then 174if ! echo "import south; print [0,8,4] == map(int,south.__version__.split(\".\"))" | python 2>/dev/null | grep True >/dev/null; then
172 echo -e "This program needs South 0.8.4. Please install with\n\nsudo pip install south==0.8.4" 175 echo -e "This program needs South 0.8.4. Please install with\n\npip install south==0.8.4"
173 return 2 176 return 2
174fi 177fi
175 178
diff --git a/bitbake/toaster-requirements.txt b/bitbake/toaster-requirements.txt
new file mode 100644
index 0000000000..19b5293722
--- /dev/null
+++ b/bitbake/toaster-requirements.txt
@@ -0,0 +1,4 @@
1Django==1.6
2South==0.8.4
3argparse==1.2.1
4wsgiref==0.1.2