summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-09-23knotty: ensure progress bar output is accounted for in displaypaule/bb-progress-fix3Paul Eggleton
When calculating how many lines we'd printed we weren't properly taking the progress bars into account, with the result that sometimes if the last line printed on the terminal wrapped to the next line (which is possible) we backed up less lines than we should have. Additionally, we should always print a newline after updating the progress bar - there's no need to check if there wasn't output (there always will be courtesy of our overridden _need_update()) and we now allow the line to wrap so we don't need to check the other condition either. Hopefully this will fix [YOCTO #10046]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-21cooker/providers: Only add target to world build if task existsRichard Purdie
A "bitbake world -c unpack" currently breaks as not all tasks have an unpack task. This change allows addition of world targets only if the specified task exists which makes certain commands possible when otherwise you just get errors which can't easily be avoided. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21fetch2: handle absolute paths in subdirRoss Burton
Currently if you use the subdir parameter in a SRC_URI and pass an absolute path then it gets appended to the unpack directory instead of being used directly. This is inconvenient as it may be useful to use ${S} when you want to unpack a file into the source tree. Change this behaviour so that absolute paths are used directly instead of being appended to the root directory. To ensure that recipes cannot write files to an arbitrary location enforce that the subdir starts with the unpack root. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21bitbake-user-manual: Added information for using single quotesScott Rifenbark
Fixes [YOCTO #10293] In the section about setting variables, I added a paragraph that explains the use of single quotes when setting a variable. The case covers when you must have the double quote charater as part of your variable's value. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21bitbake-user-manual: New section on functions you can call from PythonScott Rifenbark
Fixes [YOCTO #10100] I added a new parent directory named "Functions You Can Call From Within Python". This section contains a couple new sub-sections. One is the existing "Functions for Accessing Datastore Variables". The other is called "Other Functions", and it is used to point or reference some commonly used functions that the user can call from within Python. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-21bb.build: in _exec_task, catch BBHandledExceptionChristopher Larson
We don't want a traceback for this exception, we need to catch it, fire TaskFailed, and return failure. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20runqueue: Handle missing sstate dependencies betterRichard Purdie
If you "bitbake glibc-locale" then delete the libpcre-native sstate and "bitbake glibc-locale -C package_write_rpm", it will fail with rpmbuild missing the libprce library. The reason is that libpcre-native fails to install from sstate (since it isn't present) but doesn't get built and hence rpm-native tries to run without its dependencies. The simplest fix is not to add "covered" tasks which have failed to install sstate. I can't help feeling there is more to this issue but this does fix the current problem and shouldn't have adverse affects. It is an unusual situation to have missing dependencies in sstate since they're usually all present or not at all. I've taken the opportunity to remove some old cruft from when we had numeric task ids, the code can be simpler now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: buildinfohelper local layer don't construct path using git infoMichael Wood
When the layer is local source don't try and work out the location of the layer by using the git information (getGitCloneDirectory) [YOCTO #10199] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: Add tests to detect if we have missing db migrationsMichael Wood
Based on the same test as found in patchwork by Damien Lespiau https://github.com/dlespiau/patchwork/blob/master/patchwork/tests/test_db.py Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: unlock BuildEnvirnoment when build is doneEd Bartosh
There is no need to lock build environment before changing build status as this operation is very fast. However, there is a need to unlock it after changing build status. Explicitly unlocked BuildEnvironment after build reaches final status SUCCEEDED, FAILED or CANCELLED. This should allow runbuilds process to pickup next build faster. 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-09-20runbuilds: code cleanup - remove unused importsEd Bartosh
Fixed pylint warning: W0611(unused-import): Unused import 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-09-20runbuilds: code cleanup - whitespaces, long linesEd Bartosh
Fixed following pylint warnings: C0330(bad-continuation): Wrong hanging indentation before block. C0326(bad-whitespace): No space allowed around keyword argument assignment C0326(bad-whitespace): Exactly one space required before assignment C0301(line-too-long): Line too long 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-09-20runbuilds: process builds on startEd Bartosh
If Toaster is stopped incorrectly there could be some build requests and builds in incorrect state left from the previous run. Running main processing function on start should take care of those. 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-09-20runbuilds: process builds on SIGUSR1Ed Bartosh
Run main processing function 'runbuild' only if SIGUSR1 is received. This signal is sent by Toaster when build status is changed (either started, cancelled or finished). This should stop continuous database polling as run_builds function will be called only when needed, i.e. after build status is changed. [YOCTO #8918] 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-09-20toaster: notify runbuilds when build status changesEd Bartosh
Called signal_runbuilds API when build is scheduled, cancelled or finished to notify runbuilds process about builds status change. [YOCTO #8918] 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-09-20toaster: implement signal_runbuilds functionEd Bartosh
This function reads pid of runbuilds process from BUILDDIR/.runbuilds.pid and sends SIGUSR1 to it. signal_runbuilds function will be used in Toaster code to notify runbuilds when build is scheduled, finished or cancelled. 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-09-20toaster: fix checking of repository urlEd Bartosh
Toaster checks gir repository url is the same as locally cloned before checking it out to existing local clone. This check can be skipped if commit is 'HEAD' as in this case repository is not hard reset to commit, so the local clone won't be changed. [YOCTO #10163] 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-09-20cookerdata.py: Catch BBHandledException, preventing a backtrace in an eventMark Hatle
The event handling 'Exception' was catching and triggering a backtrace. This trace was obscuring any errors from an event handler that had raised the BBHandledException, which should indicate do not print additional information. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20cooker.py: add LAYERRECOMMENDS processingJoe Slater
Add recommended layers to collection_depends[] so that dynamic priority assignment will work for both depends and recommends. Recommended layers do not cause an error or warning if they are not in the collection list, but debug messages are output for level 3 and above. explode_dep_versions2 returns a dictionary, so we change the variable deplist to depDict. The dictionary values are lists which are either empty or contain only one version specification. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: Remove duplicate layer informationBelen Barros Pena
In the custom recipe details page, the layer information is displayed twice in the right hand column. Remove one of the layer entries, since showing the layer information once should be enough. [YOCTO #10037] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: Indicate active navigation elementBelen Barros Pena
The left navigation in the build history pages is not showing the active item when you navigate directly to the errors or warnings information in the build summary. Add a special case to make sure the "build summary" item is highlighted. [YOCTO #9864] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20toaster: Fix links to tasks with specific outcomeBelen Barros Pena
The build dashboard provides a count of tasks that were executed and not executed, and of tasks that failed (if any). The number is a link to the list of tasks. Fix the links so that they filter the tasks table by the selected criteria (executed, not executed or failed). [YOCTO #9832] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-20uihelper: use elif instead of repeated ifRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cooker: check if target contains taskEd Bartosh
Task name was incorrectly added to the targets that already contained :task suffix and fired with BuildInit event. This caused Toaster to create incorrect Target objects and show them in UI. [YOCTO #10221] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cookerdata: allow multiple passes of config re-parsingMarkus Lehtonen
[YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16cookerdata: fire ConfigParsed event after re-parseMarkus Lehtonen
[YOCTO #10188] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16Add missing file from 'toaster: Allow git information to be null for BRLayer'Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14build: Allow dirs/cleandirs to work for empty functionsRichard Purdie
Users are surprised when dirs/cleandirs aren't acted upon for empty functions. This reorders the code slightly so that those flags are acted upon for empty functions as there are cases where this is expected. [YOCTO #10256] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14bitbake: fetch2: Make SRCREV_FORMAT name substitution saferUlf Magnusson
The implementation of SRCREV_FORMAT has at least two issues: 1. Given two names "foo" and "foobar" and SRCREV_FORMAT = "foo_foobar", "foo" might currently get substituted twice, and "foobar" not at all. 2. If the revision substitued for some name happens to contain another name as a substring, then that substring might incorrectly get replaced. Fix both issues by sorting the names with the longest ones first and replacing all names at once with a regular expression. This was inspired by http://stackoverflow.com/questions/6116978/python-replace-multiple-strings. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14fetch2/npm: don't download same URL multiple timesPaul Eggleton
If we've already fetched a particular URL then we do not need to do so again within in the same operation. Maintain an internal list of fetched URLs to avoid doing that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14event.py: output errors and warnings to stderrEd Bartosh
All logging messages are printed on stdout when processing UI event queue. This makes it impossible to distinguish between errors and normal bitbake output. Output to stderror or stdout depending on log level should fix this. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06cooker: record events on cooker exitEd Bartosh
Bitbake collects all events in special event queue when called with -w option. However, it starts to write events to the eventlog only after BuildStarted event is received. In some cases this event is not received at all, e.g. when bitbake is run with --parse-only command line option. It makes sense to write all collected events when CookerExit event received to make sure all events are written into the eventlog even if BuildStarted event is not fired. [YOCTO #10145] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: don't kill all runserver processesEd Bartosh
Toaster script kills runserver process 2 ways: - sending signal to pid from .toastermain.pid. - sending signal to pids found by grepping ps output: ps fux | grep "python.*manage.py runserver" Second approach is redundant and harmfull as it kills all django development server running on the machine. [YOCTO #7973] 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-09-06toaster: remove handling of .toasterui.pidEd Bartosh
This file is not created anywhere, but handled in toaster script code. 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-09-06toaster: don't kill toaster on startEd Bartosh
There is no point of trying to kill django development server when toaster starts because 'manage.py checksocket' command is already used in the script code to check if development server port is occupied. Even if Toaster is listening on another port, killing previous instance looks quite implicit and doesn't solve anything as there are other processes that might be still running. 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-09-06toaster: orm Update IMAGE_FSTYPES valuesBelen Barros Pena
This patch fixes a typo in one of the IMAGE_FSTYPES values listed in Toaster. It also updates the hardcoded list of values to match the latest list in meta/classes/image_types.bbclass [YOCTO #9447] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: keep layer name in variable history pathDavid Reyna
When converting variable history file names to relative paths, keep the layer directory's name so that the user can distinguish between conf files with the same name. [YOCTO #8188] Signed-off-by: David Reyna <david.reyna@windriver.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: Allow forward slash in variable namesBelen Barros Pena
Add forward slash to the list of special characters allowed in variable names. Also update the list of allowed special characters in the error messages. [YOCTO #9611] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: layer details Fix "edit" form interactionBelen Barros Pena
Make sure the layer information disappears when the edit form shows, and that the layer details come back when you click the 'cancel' button in the edit form. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: import layer Layout fixesBelen Barros Pena
The layout of the import layer form was looking a bit awkward. This commit tidies things up a bit. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: layer details Layout fixesBelen Barros Pena
The layout of the layer details page was looking a bit awkward. This commit tidies things up. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: configuration Provide machine help textBelen Barros Pena
When you change the machine from the project configuration page, you get some useful suggestions as you start typing a machine name. However, the suggestions only include machines provided by the layers added to your project. This is not necessarily clear from the design (yes, it should be improved), which means you might be looking for a machine, not see it in the suggestions, and assume the machine is not supported by OpenEmbedded. Since we are in no position to change the design of this page right now, add some explanatory help text to address the situation. [YOCTO #8034] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06toaster: tasks Remove recipe version from defaultsBelen Barros Pena
The 'Recipe version' column should not be part of the set of columns shown by default in the tasks table. Set the hidden property for that column to 'True' so that it doesn't show when you load that table for the first time. [YOCTO #10179] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06lib/bb/utils: edit_metadata() comment tweaksPaul Eggleton
No functional changes, just make a couple of minor tweaks to the comments for edit_metadata(): * There are four elements to be returned by the callback function * Add an example return statement for when you don't want to modify the value Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06fetch2/npm: clarify commentPaul Eggleton
The correct name of the parameter is "version" not "ver" so ensure we aren't misleading the user by giving the latter in an example. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06fetch2/npm: handle top-level shrinkwrap filePaul Eggleton
Allow using a top-level shrinkwrap file with one or more npm:// dependencies, i.e. if the module isn't found at the top level then look one level down. Part of the fix for [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06fetch2/npm: support subdir= parameterPaul Eggleton
"npmpkg" can be a default, but it should respect the subdir parameter as with other FetchMethods. This allows us to have more than one npm:// entry in SRC_URI without nasty hacks. Fix required in order to support [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06fetch2/npm: fix broken fetches if more than one npm URL fetchedPaul Eggleton
You cannot set a URL-specific value in an object-level variable on the FetchMethod in urldata_init() or the result is the value specific to the last URL will be the one that gets set. This prevented fetching more than one npm:// URL correctly - the other tarballs would not download to the correct location and do_unpack failed to find them as a result. Fix required in order to support [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-06fetch2/npm: explicitly specify workdirPaul Eggleton
We were downloading into the current directory here, which is fine if that current directory can be expected to be the right place - but that's not true when called from recipetool within OE. We should explicitly specify the directory to run the command in and then there won't be a problem. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02bb.fetch2.svn: correctly pass workdir when fetchingChristopher Larson
The ud.pkgdir argument was being passed as the 'quiet' argument to runfetchcmd, not the 'workdir' argument, resulting in fetching the svn module into the root of DL_DIR, not where it belongs. Cc: Matt Madison <matt@madison.systems> Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>