summaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2016-04-29bitbake: Switch to post release versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06Update version to 1.30.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: export BBBASEDIR variableEd Bartosh
This variable will be used in localhost controller code to determine correct bitbake location, so it has to be exported. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: update conf/local.confEd Bartosh
Added 'INHERIT+="toaster buildhistory"' line to the conf/local conf when Toaster starts. It should make commandline builds to provide all required information to Toaster backend. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: set BITBAKE_UI environment variableEd Bartosh
Set BITBAKE_UI variable to 'toastergui' for command line builds to use toasterui as a default ui module for bitbake. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: get rid of noui optionEd Bartosh
noui command line option doesn't makes sense anymore as toaster doesn't run bitbake. It should be safe to to remove it. The purpose of this option was to skip running bitbake observer process. This was never used before as it's not possible to run toaster build without running observer. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: don't start bitbake serverEd Bartosh
>From now on toaster script will not run bitbake server. It will be started by runbuilds and stopped after the build. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31bitbake: Don't limit traceback lengths to arbitrary valuesRichard Purdie
There appears to have been a lot of copy and pasting of the code which prints tracebacks upon failure and limits the stack trace to 5 entries. This obscures the real error and is very confusing to the user it look me an age to work out why some tracebacks weren't useful. This patch removes the limit, making tracebacks much more useful for debugging. [YOCTO #9230] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30Bump version to 1.29.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02toaster: cleanup of bin/toaster startup codebrian avery
This cleanup fixes a few issues: 1) Removes the superflous code to set toasterconf.json - this isn't used and referenced meta-yocto 2) Changes exit to return so we don't surprise the user by exiting their shell - this is necessary because it is being sourced 3) Removes the last references to the old TOASTER_MANAGED variable - this is historical and no longer used. 4) Adds -t parameter to lsof - This stops it from dying on odd filesystems and is much faster since all we are using are processes anyway 5) Handles start and stop as params - it was easy to confuse the script especially if we were calling it with parameters. - if start/stop isn't specified, it will still toggle Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-12Bump version post release to 1.29.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04lib/bb: Add expansion parameter to getVarFlagRichard Purdie
This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the expand default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` There should be no functional change from this patch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31cooker, bitbake-worker: Fix spelling of "received"Phil Blundell
I before E, except after C... Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-29bitbake: Set process names to be meaninfulRichard Purdie
This means that when you view the process tree, the processes have meaningful names, aiding debugging: $ pstree -p 30021 bash(30021)───KnottyUI(115579)───Cooker(115590)─┬─PRServ(115592)───{PRServ Handler}(115593) ├─Worker(115630)───bash:sleep(115631)───run.do_sleep.11(115633)───sleep(115634) └─{ProcessEQueue}(115591) $ pstree -p 30021 bash(30021)───KnottyUI(117319)───Cooker(117330)─┬─Cooker(117335) ├─PRServ(117332)───{PRServ Handler}(117333) ├─Parser-1:2(117336) └─{ProcessEQueue}(117331) Applies to parse threads, PR Server, cooker, the workers and execution threads, working within the 16 character limit as best we can. Needed to tweak the bitbake-worker magic values to tell the workers apart. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-22toaster: run bitbake server with --read optionEd Bartosh
Toaster script run bitbake with --postread conf/toaster.conf. It turned out that variables set this way don't influence the build. Changing --postread to --read makes bitbake to read variables earlier and should fix this issue. [YOCTO #8781] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-16toaster: increase timeoutEd Bartosh
Sometimes Toaster connection to the bitbake server fails with this error in the log: ERROR: Could not connect to server 0.0.0.0:46572 : Could not register UI event handler It happens more often on slow machines. Increasing timeout after restarting bitbake should fix this issue. [YOCTO #8776] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: remove 2 confusing parametersEd Bartosh
Removed nobrowser and brbe script parameters as both are confusing and nobrowser is not used anywhere. brbe parameter usage can only be justified if toaster doesn't work properly and user has to manually connect toaster to running bitbake server. Even in this scenario it's very unlikely to achieve as toaster script is not designed for this kind of usage. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: move setting of default valuesEd Bartosh
Set default values of script parameters just before they are parsed to increase readability. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: move startup checks to a better placeEd Bartosh
Moved addr:port, bitbake.lock and toastermain.pid checks to the place where the rest of Toaster starting happens. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: remove 2 unused functionsEd Bartosh
Removed check_pidbyfile and notify_chldexit functions from toaster script as they're not called in the script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: remove addtoConfiguration functionEd Bartosh
This function is useless as it's called just once and makes code less readable. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: updated header of the toaster scriptEd Bartosh
Updated GPL information, years of development and usage information. Removed outdated information about 2 ways of starting Toaster. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: add MANAGE variableEd Bartosh
Used MANAGE variable to avoid repeating path to manage.py in many places in toaster script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: remove unused variableEd Bartosh
Removed unused variable RUNNING from the toaster script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: split long lines, add/remove whitespaceEd Bartosh
Made toaster script more readable by splitting long lines and removing and adding whitespace. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: check if address:port is in useEd Bartosh
Used new management command checksocket to check if Toaster can listen on address:port. [YOCTO #8775] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14toaster: rework checking of Django versionEd Bartosh
Checked django version considering information from toaster-requirements.txt, e.g. if requirements file contains line "Django>1.8,<1.9" toaster should be able to check that requirement correctly. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14toaster: removed extra calls of migrateEd Bartosh
One manage.py migrate should be enough to apply migrations for all applications. Extra calls just slow toaster script down. Removed calls of migrate for orm and bldcontrol apps. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14toaster: Check Django version against toaster-requirements.txtElliot Smith
Instead of hard-coding the required Django version in the start script, look it up from the toaster-requirements.txt file. [YOCTO #8364] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14toaster: Update deprecated manage.py commandElliot Smith
syncdb is deprecated in favour of migrate in Django 1.7: https://docs.djangoproject.com/en/1.8/releases/1.7/#schema-migrations Update to the "migrate" command in Toaster's start script. [YOCTO #8364] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14toaster: Upgrade to Django 1.8.6 and remove SouthElliot Smith
Upgrade Django to long-term support version. Django now provides its own migration framework, so remove requirement for South. [YOCTO #8364] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: unset environment variablesEd Bartosh
Toaster script sets environment variables when it starts. It makes sense to unset them when toaster stops as they can cause other programs to behave incorrectly. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: stop using toaster-pre.confEd Bartosh
This file is not needed anymore as toaster UI doesn't write variables to it. It sets them directly on bitbake server. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: implement 'toaster restart-bitbake'Ed Bartosh
This implementation allows to have functionality of restarting bitbake in toaster script. It can be used by toaster script and build controllers. [YOCTO #8279] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: implement start_bitbake functionEd Bartosh
Separated functionality of starting bitbake server and observer processes. This functionality will be used by build controllers to restart bitbake processes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: implement stop_bitbake functionEd Bartosh
Separated functionality of stopping bitbake server and observer processes. This functionality will be used by build controllers to restart bitbake processes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: start 'manage.py runbuilds' in the scriptEd Bartosh
Running runbuilds machinery in background allows Toaster to start builds initiated by toaster UI. Added runbuilds pid file to the list in webserverKillAll to kill runbuilds the same way as runserver process. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: use parent of the build dirEd Bartosh
Assigned TOASTER_DIR to the parent of the build directory. This should fix local controller crash as it assumes that TOASTER_DIR is a root of local poky and tries to clone it. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: check for toaster configuration laterEd Bartosh
Moved check for toasterconf.json after check of build environment. We'll need some variables from build environment to find toasterconf.json better way. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: remove unused variableEd Bartosh
Removed variable RUNNING as it's not used anymore in the toaster script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: change toasterconf.json logic to use TEMPLATECONF, like ↵brian avery
oe-setup-builddir This changes the way we pick a toasterconf.json file so that it matches the way oe-setup-builddir does it. We now base it on TEMPLATECONF found in the .templateconf file. Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: run bitbake the same wayEd Bartosh
Run bitbake in toaster script the same way as it's run by localbuildcontroller. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: set DATABASE_URL in toaster scriptEd Bartosh
Set environment variable DATABASE_URL in bitbake/bit/toaster Variable value is obtained by running 'manage.py get-dburl' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-07toaster: don't allow to run toaster as a scriptEd Bartosh
Removed support of starting toaster as a script. Sourcing a toaster script becomes the only way to start it. It's consistent with the way oe build system is started by sourcing oe-init-build-env. It also returns user back to shell, so user can continue running builds without having to open new terminal window. [YOCTO #8279] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16toaster: exit or return depending on the modeEd Bartosh
When toaster script is sourced 'return' should be used as using 'exit' will cause script to exit the shell and close terminal window. If script is called 'exit' should be used. Otherwise shell will throw and error: return: can only `return' from a function or sourced script Used 'return' or 'exit' depending on the toaster mode using TOASTER_MANAGED variable. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16toaster: set TOASTER_MANAGED variableEd Bartosh
Set TOASTER_MANAGED to 1 if toaster is run as a script. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16toaster: get rid of SRCFILEEd Bartosh
Used TOASTER variable instead of SRCFILE as they're essentially the same. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16toaster: use path to the script to guess config pathEd Bartosh
Used $TOASTER variable(path to the toaster script) instead of current directory name to get path to the toasterconf.json This way script should work in both modes and it doesn't depend on the current directory. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-16toaster: Always run bldcontrol migrationsElliot Smith
The toaster startup script conditionally migrates the database tables depending on whether you are in managed mode or not. This means that if you are in analysis mode, some of the bldcontrol* database tables used by managed mode are not available. As a consequence, some of the code in toaster which refers to those tables can break in analysis mode, as there's no clean isolation of the two modes. To prevent this from happening, always run the migrations for managed mode and create the bldcontrol* tables, even if in analysis mode. Also clean up the function which starts up toaster so the logic is easier to follow. [YOCTO #8277] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-11toaster: remove bashisms so script works in dash as wellbrian avery
[YOCTO #8217] Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>