Age | Commit message (Collapse) | Author |
|
In the forked child, we may use multiprocessing. There is only one event
pipe to the worker controlling process and if we're unlucky, multiple
processes can write to it at once corrupting the data by intermixing it.
We don't see this often but when we do, its quite puzzling. I suspect it
only happens in tasks which use multiprocessng (do_rootfs, do_package)
and is much more likely to happen when we have long messages, usually many
times PAGE_SIZE since PAGE_SIZE writes are atomic. This makes it much more
likely within do_roofs, when for example a subprocess lists the contents
of a rootfs.
To fix this, we give each child a Lock() object and use this to serialise
writes to the controlling worker.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a carriage return to build environment warning message to
avoid it being mixed up with shell prompt.
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If the pipe is closed, we want to ensure that we kill any child processes
by triggering the sigterm handler before we exit. This code does that,
hopefully avoiding the remaining process left behind issues on the autobuilder.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If we SIGKILL cooker (the parent process), ensure the worker notices
and shuts down gracefully. To do this:
* trigger the sigterm handler if the parent exits
* ensure broken pipe writes don't trigger backtraces which interfer with
other exit work
* notice if our command pipe is broken due to EOF and sigterm if so
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
start/end are unused here and we can improve the code conditional blocks.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add a -i/--inherits option to filter the output to include only recipes
inheriting the specified class(es).
Implements [YOCTO #7475].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
bitbake-layers needs to map recipe and class files to the layer they
came from within the show-recipes and show-overlayed commands. However,
it turns out that mapping a file to the layer it came from is not as
trivial as it might seem. To do it properly we need to match the path to
an entry in BBFILES then map that to the collection name using
BBFILE_PATTERN, then map that to the actual layer using variable
history. If it doesn't match any entry in BBFILES, then we can fall back
to BBFILE_PATTERN (to handle classes and conf files).
This fixes the layer name not showing up properly in the output of the
show-recipes and show-overlayed commands for recipes in layers such as
meta-intel that have subdirectories in BBFILE_PATTERN. It also fixes the
priority not showing up in show-layers for such layers.
As part of this I've added a function to VariableHistory which for a
space-separated list variable gives you a dict mapping the items added
to the files in which they were added. I've also fixed
bb.utils.get_file_layer() and reduced some of the duplication by using
this function in bitbake-layers. Also fixes the priority not showing up
for layers such as meta-intel
Fixes [YOCTO #8160].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If the specified layer isn't a path, then just match on the directory.
Fixes [YOCTO #7839].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We were printing an error here, but not exiting.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It's best practice to use "with open..." rather than open & close where
practical.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
flatten support currently looks broken since it doesn't appear to
deal with handling "%" support in bbappend file names.
This patch converts it to use collections.get_file_appends() which
correctly handles "%" support.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Also document BB_SKIP_NETTESTS=yes parameter in --help output.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Made it working in dash. Note, that due to dash limitations
script will not work if sourced.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
Fixed the following bashisms:
replaced echo -e -> printf
removed 'function' from function definitions
replaced $(< ${file}) -> `cat ${file}`
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We enable a "nobrowser" parameter that inhibits
the launch of a browser when toaster starts.
This is useful for integration with automated startup scripts
and enables headless testing.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
In an effort to fix client-side session storage using
cookies, we enable server-side session support for all pages.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
I noticed that I was seeing loss of the log files when hitting
control-c while debugging a function in bitbake. In fact if you
take a recipe and replace its compile function as shown below let
it run for a few seconds and hit control-c, you will see first
hand that log data is not there.
do_compile () {
while [ 1 ] ; do
echo -n "Output date: "
date
sleep 1
done
}
It turns out there was a regression introduced by commit:
d0f0e5d9e69 which created the bitbake worker. Since the bitbake
worker is started in its own process space, it needs the exact
same code added from commit: 88429f018b where the problem was
fixed the first time around.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The bitbake observer is now started using python subprocess. This should
allow for toaster to run without installing the "daemon" application.
[Yocto #7271]
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This tests very basic usage of the parser and then adds a test
to ensure that incomplete functions raise an exception.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Replaced tabs with 4 spaces.
Removed useless semicolons at the end of lines.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Fixed shell syntax not understood by zsh. Made toaster
script to work for both shells in both modes: sourced and
directly called.
[YOCTO #6964]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
This patch properly shuts down toaster in interactive mode
under Mac OSx.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
This patch modifies the toasterui to properly return the exit
code based on the errors found in the toaster itself.
The upload event file API call will not delete event logs for which
toasterui showed an error. This will facilitate debugging.
Minor enhancement in the buildinfohelper to reduce the number
of lookups on unknown layer objects (prevented testing of the patch).
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
Used sys.exit instead of assigning exit code to
variable. This way it's more clear when bitbake
exists and which exit code is used.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Bitbake program and core versions must match.
Moved __version__ from main.py back to bin/bitbake.
Implemented check for version match in bin/bitbake.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
tbs
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some error messages were lost because BBMainException was
inherited from bb.BBHandledException. When bb.BBHandledException
is processed error messages are not printed as they suppose to
be printed before raising this exception.
Stopped to inherit BBMainException from bb.BBHandledException.
Handled BBMainException in bin/bitbake and printed error message
to the stderr.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
having the same hash values
For now, `bitbake-diffsigs -t <recipe> <task>' doesn't work. It always outputs
nothing.
The problem is that bitbake-diffsigs are comparing sigdata and siginfo files
that have the same hash value. This is not what we want. These two files are
actually duplicates considering the purpose of bitbake-diffsigs. So we need
to remove one of them so that bitbake-diffsigs could actually compare the
correct signature files.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In show-recipes and show-overlayed, we only list one variant of each
recipe where multiple exist, therefore we should show the main one (e.g.
in OpenEmbedded, we now show openssl and not nativesdk-openssl which
would otherwise sort first.)
Fixes [YOCTO #7514].
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is particularly problematic since qemu images switched to ext4 by
default and now cannot work properly with UIs like hob.
This patch adds in ext4 to the appropriate variable fixing this.
[YOCTO #7426]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Moved most of functionality of bin/bitbake to lib/bb/main.py
to be able to call bitbake from python code.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We use logger.plain() to produce actual output which needs to go to
stdout. We could use more advanced filtering (and probably should in
future) but for the moment let's just fix the regression.
Fixes [YOCTO #7458].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The recent refactoring caused use of wildcards to trigger a traceback
because the old variable name was being used.
Fixes [YOCTO #7367].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In order to bring in transaction.set_commit support,
we need Django 1.6, discarding support for Django 1.5
This patch removes 1.5 from the list of acceptable Django
versions.
Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
layer index
Add a command to query layer dependencies from a layer index such as the
OpenEmbedded Layer Index at http://layers.openembedded.org. Fetches the
layer and its dependencies and adds them into conf/bblayers.conf.
[YOCTO #5348]
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Logging output was simply not getting printed.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This makes help formatting and option handling a lot more standardised
and allows us to drop a bunch of code. We also gain slightly more
straightforward error handling.
One side-effect however is that the old subcommand syntax using
underscores is no longer supported. The dashed form has been supported
(and displayed in the help text) for quite a while now so I wouldn't
imagine that will be much of an issue.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch improves the logging facilities for toaster in order
to help diagnose bugs that happen on user machines.
The logs are stored now under "/tmp/toaster_$$" where $$ is a
PID-based unique identifier. On shutdown, toaster will automatically
erase all logs unless errors are listed in the log file.
On error, Toaster provides suggestions on what to do.
This patch includes a minor fix found as a result of logging
improvements.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
This patch brings fixes and enhancements in the startup sequence.
- the dependency version checking is now correctly enforced when
starting in both modes
- fixed errors in looking up environment variables
- added message with 'daemon' program start location
- presenting menu for selecting config file
[YOCTO #7283]
[YOCTO #7291]
[YOCTO #7273]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
A small typo slipped in the message included in
the fix for [YOCTO #6023].
Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
|
|
This patch makes sure that all the toaster conf files are actually
written from the build enviroment controllers.
Additionally, toaster checks that the 'daemon' program, which is used
to start the build system, is available (currently for localhost).
[YOCTO #7171]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch updates the prompts to the user to better explain
what Toaster is doing and the information it needs from the user.
Additionally, fixes a check in loadconf command.
[YOCTO #6785]
[YOCTO #7251]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch makes Toaster managed mode obey the "noweb" parameter
by not starting the web server and launching the web browser
command if the "noweb" parameter is specified.
The web browser will be pointed at 127.0.0.1 instead of 0.0.0.0
[YOCTO #7039]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We change the setting of variables from directly injection
into the set-up cooker to writing a conf file that is pre-read
on bitbake server startup. This is needed because the injection
can only happen after the variable set is parsed, and the variables
already inferred, so setting up variables happens too late.
[YOCTO #7045]
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The bug has a long discussion of this. Basically, in some environments,
the exact details of which aren't understood, a Ctrl+C signal to the
UI is being transmitted to all the process children. Looking at the output
of "ps ax -O tpgid", its clear the main process is still the terminal
owner of these processes.
stty -a on a problematic system shows: "-ignbrk brkint"
and on a working system shows: "-ignbrk -brkint"
The description of brkint would suggest this is the problem, setting up
that terminal environment wasn't able to reproduce the problem though.
It was confirmed that using setsid() caused the problem to be resolved
and is probably the right thing to be doing anyway, so lets do it.
[YOCTO #6949]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
* Fix add-layer error message when a layer is already in BBLAYERS
* Ensure we show an error message if we can't find BBLAYERS at all
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Add add-layer and remove-layer commands for easily adding and removing
layers to/from bblayers.conf.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch adds a "-w/--write-log" option to bitbake
that writes an event log file for the current build.
The name of the file is passed as a parameter to the "-w"
argument. If the parameter is the empty string '', the file
name is generated in the form bitbake_eventlog_DATE.json,
where DATE is the current date and time, with second precision.
The "-w" option can also be supplied as the BBEVENTLOG
environment variable.
We add a script, toater-eventreplay, that reads an event
log file and loads the data into a Toaster database, creating
a build entry.
We modify the toasterui to fix minor issues with reading
events from an event log file.
Performance impact is undetectable under no-task executed builds.
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
|