Commit Graph

1013 Commits

Author SHA1 Message Date
Alexandru DAMIAN d7c8d9558c bitbake: toaster: fill in build data from buildrequest
This patch adds logic to complete changing the interface
from showing BuildRequests to showing Build data.

The BuildRequest data is now transformed in Build data with
proper Toaster exceptions being recorded instead of listing
problems during startup as build errors.

(Bitbake rev: 51a41172d0b390370f9a38696b1ac65666ada4d2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:32 +01:00
Richard Purdie 69b6919341 bitbake: bitbake: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.

This patch was mostly made using the command:

sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`

(Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:57:53 +01:00
Alexandru DAMIAN 56c5ff920c bitbake: toaster logger: assign projects to all builds
Bitbake logger now sets a default project if the TOASTER_BRBE
or TOASTER_PROJECT Bitbake variables are not set.

This a necessary step in getting all builds under a project,
as to unify the MANAGED and interactive modes.

Other small fixes are included, related to the size of the
fields in the database.

(Bitbake rev: 5e0bf388f4e5c1cc493ac8264785e631bad2f672)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:44 +01:00
Alexandru DAMIAN e3e85bdf71 bitbake: toaster logger: refactor recipe and layer file paths
This refactoring brings the "local_path" of the
layer from the Layer object to the Layer_Version object, which
is more appropriate as different checkouts of the same
Layer may live in different directories.

This enables us to store Recipe file paths relative to a Layer_Version
at all times, aleviating the need to store full file paths in the
database. We also turn the prefix of the path (e.g. virtual:native
path name space) into a pathflag field.

In turn, this solves the problem of mis-identification of tasks based
on the recipe file paths, since we can also match the namespace of the
file paths on the recipe files.

[YOCTO #7594]

(Bitbake rev: ec43dc569e370767c709dec225cbee0c99151c19)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:43 +01:00
Alexandru DAMIAN 4b59ba1bbb bitbake: toasterui: close build on BuildCompleted event
Moving the code to close the build and instantiate a fresh
buildinfohelper object to BuildCompleted event, as the
CommandCompleted/Failed/Exit events come in too early.

(Bitbake rev: af63abe88327fd5c1b3d7c00a84d9e408ef23285)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:05 +01:00
Alexandru DAMIAN 7759cd4931 bitbake: toasterui: proper exit code on toaster errors
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).

(Bitbake rev: 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-08 17:42:05 +01:00
Alexandru DAMIAN 87c4e58dda bitbake: toasterui: enable sanity checker
Since toasterui acts as the user-facing UI, we need
to run sanity checks in order to let the GUI display proper
warnings and stop the build if something is wrong.

(Bitbake rev: 260dd77fa771ae3b777134f4178d344e96b6f3d6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-25 12:39:58 +00:00
Alexandru DAMIAN 1385f28770 bitbake: uievent: catch and log exceptions in receiving events
This patch prevents tracebacks and instead logs exceptions
that may happen during event processing.

[YOCTO #7216]

(Bitbake rev: 0412631fb4a15ff42bf5ee46a77920fa558ae358)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-25 12:39:50 +00:00
Alexandru DAMIAN 5252c459ac bitbake: toastergui: recipe and layer identification
This patch fixes the recipe and layer identification by path
when Toaster uses relative paths.

(Bitbake rev: a92bb33a3ceacab2bfee9df1c39a202832866970)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21 00:00:26 +00:00
Alexandru DAMIAN 9752757da0 bitbake: toasterui: fix error message parameter
Fix the error message parameter.

(Bitbake rev: 64b0867108d03c7e9215b80c59c1bba919e82994)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21 00:00:25 +00:00
Alexandru DAMIAN a273d8f151 bitbake: toasterui: improve info in the toaster_ui.log
We improve logging and signalling of errors in the
toaster_ui.log to facilitate debugging on remote systems.

(Bitbake rev: 3cd248f99b90367bd41aab81e255fc1912434890)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21 00:00:23 +00:00
Robert Yang 0308f3101b bitbake: knotty.py: fix indent
It used 5 spaces as the indent.

(Bitbake rev: 162d35ed53d34b28b153adf643044e7f105fcff1)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-19 14:20:14 +00:00
Alexandru DAMIAN 887c1cb446 bitbake: toasterui: relative recipe paths
We modify the toasterui to log relative recipe paths
in order to maintain consistency with data fetched from
the layer sources.

(Bitbake rev: 253d69e88fd68729196ad43c15e8733527d76198)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:44:10 +00:00
Alexandru DAMIAN cca517056b bitbake: toasterui: identify proper layer in build mode
In build mode, instead of creating our own layer objects,
we identify the layer objects that the build system set up.

[YOCTO #7378]

(Bitbake rev: 22962b540ace6868cb357c0fd13f01ffd24449c4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:44:07 +00:00
Rob Woolley 855fc21ae9 bitbake: knotty: Do not log show_versions output
Every time the bitbake show versions command (bitbake -s) is run it creates
a 100k log file.

The consolelogfile is disabled for show environment and disabling show
versions would make the behaviour match.

(Bitbake rev: dee0ba94e39ea49c1e9261a5e8932356e3bb7c57)

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:41:28 +00:00
Rob Woolley 0b5ab4d987 bitbake: knotty: Catch exceptions on broken pipes
Any exceptions that occur in calls to logging methods are automatically
suppressed, including exceptions due to broken pipes.

However, the knotty summary messages are printed directly to stdout, which
means that any broken pipes will cause an exception traceback in python.

By wrapping the summary section in a try / catch block we can check for
IOError exceptions caused by broken pipes and let them pass.

(Bitbake rev: 146e7e157f97b676858ecff583dd53800d997253)

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:41:28 +00:00
Alexandru DAMIAN ee1af30548 bitbake: toasterui: do not use transactions if the database autocommits
Some databases, notably the SQLite3 adapter, force autocommits even if
the autocommit is turned off. The behavious is tracked in this bug:
http://bugs.python.org/issue8145#msg109965

Django refuses to work with autocommit off in this case, so we have
to take the same precautions when using manual transaction support.

[YOCTO #7363]
[YOCTO #7365]

(Bitbake rev: 90231ab63a129fa344d461c2911898ea0f07f206)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-27 07:36:07 +00:00
Alexandru DAMIAN f116c32f2a bitbake: toasterui: fix sstate task identification
This patch fixes a problem where set sstate scene tasks
were not identified, causing cache attempt not being recorded.

[YOCTO #7223]

(Bitbake rev: 8a326a9a5a08981f1b7960e02fdb8a9436db16fb)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-27 07:36:05 +00:00
Alexandru DAMIAN cb23e3043b bitbake: toasterui: disable autocommit for build logging
This patch disables autocommit for inserting build data,
effectively updating all build data in a single transaction.

This is a purely performance improvement patch, as the transaction
will always be commited.

Similar manual transaction handling in the layer source update
method. Added feedback messages during update method.

[YOCTO #7140]

(Bitbake rev: 3978c819e797f857235499a4b8ec238134f1c028)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:45 +00:00
Alexandru DAMIAN c368d83bd6 bitbake: toaster: bitbake cooker log saving and downloading
This patch brings in cooker log saving and proper download links.

* toasterui will now write the cooker log file if running in managed
mode
* the BuildRequest has a new state, REQ_ARCHIVE, indicating that the
build is completed, and the artifacts are ready to be grabbed
* the runbuild test execution commands will gather needed artifacts,
and save them to a storage directory selected during Toaster setup.
* the build dashboard, project builds and all builds pages have
permanent links for the cooker log

[YOCTO #7220]
[YOCTO #7206]

(Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Maxin B. John b427750a5d bitbake: depexp.py: Fix segfault if DISPLAY is not set
bitbake -g -u depexp <package> segfaults when DISPLAY is not set
properly. Fix it with a proper check.

[YOCTO #7299]

(Bitbake rev: f35e9bd7b59c180fe9a3d9177efb57b92d9cd373)

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:09:43 +00:00
Alexandru DAMIAN da8110a86a bitbake: toaster: improve logging facilities for toaster
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.

(Bitbake rev: 8a8248f7b7e30469f592e2f8adbf6ce21e8685c5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru Damian fefef50e54 bitbake: toasterui: do not filter images by extension
ToasterUI filters build artifacts by extension in order
to determine if a build artifact is an image or not.

Using IMAGE_FSTYPES for this purpose is not correct as
the varible value holding image extensions is just a coincidence.

So we just look if the filename contains the "rootfs" magic
string, which is a pretty good approximation.

[YOCTO #7213]

(Bitbake rev: b11e8bd626e0212ee72914529c3d92d1dd718674)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Alexandru DAMIAN c7af070b66 bitbake: toasterui: save event backlog to build
We add a call that saves any queued events to the build

[YOCTO #7021]

(Bitbake rev: 4f5b19d453da64749affc1c27ec51b013bedc71a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Richard Purdie db45ddeeaf bitbake: command/cooker/knotty: Fix memres handling of command environment changes
If the environment changes, we need memory resident bitbake to adapt to those
changes. This adds in functionality to handle this alongside the configuration
option handling code. This means that the common usage:

MACHINE=X bitbake Y

now works with the memory resident server.

(Bitbake rev: 4d1343010da757a0c126bc22475354da44aaf8e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Alexandru DAMIAN 4e20211090 bitbake: toasterui: fix variable data error
A bug slipped in the toaster ui that prevented saving of
build configuration despite the data being retrieved
from the server. This patch fixes the shaming mistake.

[YOCTO #7117]

(Bitbake rev: 8118f465b9f87c66b2a741008f69198ac5fea901)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Andy Voltz 6b33e1a840 bitbake: ui/ncurses: Update ncurses ui to accept configParams
(Bitbake rev: 730b4c50364fba7173309278d670eda02e0ce38e)

Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Alexandru DAMIAN 85a17f86ea bitbake: add option to write offline event log file
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.

(Bitbake rev: 1befb4a783bb7b7b387d4b5ee08830d9516f1ac2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN d086fa3aed bitbake: toasterui: add extra debug and development infos
We update and add logs throughout the code in order to help
with development. The extra logging is turned off by default,
but it can be enabled by using environment variables.

All logging happens through the Python logging facilities.

The toaster UI will save a log of all incoming events if the
TOASTER_EVENTLOG variable is set.

If TOASTER_SQLDEBUG is set all DB queries will be logged.

If TOASTER_DEVEL is set and the django-fresh module is available,
the module is enabled to allow auto-reload of pages when the
source is changed.

(Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN f99f2cdd69 bitbake: add build artifacts table and other improvements
We add a BuildArtifacts class to store data about files
discovered during the build process and not stored anywhere
else.

Small cosmetic changes in the toasterui.

Add model methods to return file path display data relative
to the build environment instead of absolute file paths.

[YOCTO #6834]

(Bitbake rev: bbe24d912869312d561be199b2c029b0c898e049)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN af51fb0674 bitbake: toasterui: Compatibility patch for daisy and dizzy
This patch brings in changes that allow a toasterUI coming in
from 'master' branch to record data from a 'daisy' or 'dizzy'
bitbake server.

This is needed to allow Toaster to record builds running
on older branch releases.

(Bitbake rev: 8d75e28e0688a6520311afce36543175f36910b3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Alexandru DAMIAN d9644d49fd bitbake: toasterui: fix layer identification for managed builds
If we have a managed build, we match the layers used for build
with the layers configured for project, as we know where the layers
are coming from

[YOCTO #6962]

(Bitbake rev: e02ec052a62cbc476bdac65cb7cea1167ce04781)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN af1f9fda8b bitbake: toaster: display Toaster exceptions and other fixes
Changing ToasterUI to log toaster exceptions on a different level than
build errors.

Updating the build dashboard to show Toaster exceptions.

We add extra logging to console for exceptions.

Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.

Toaster now checks for invalid states at startup and performs needed
cleanups.

Removed loading reference to jquery-ui.min.css as we do not have this
file.

(Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Ross Burton d895e9632d bitbake: depexp: use stateForceShutdown instead of stateStop
This state was renamed in bitbake 12e9d3 but this use of it wasn't changed.

[ YOCTO #5445 ]

(Bitbake rev: 196106100e2dedfacce95be0ee6def94c5a80f27)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 13:27:52 +00:00
Alexandru DAMIAN 3e9fc8d091 bitbake: toasterui: performance improvements
Improve the performance of data logging in toasterui.
We modify the data queries used to:

 * cache searching in memory
 * insert in bulk (i.e. multiple values per insert, where possible)

On development test rig (networked mysql), on no-op build,
time for data recording is reduced from 4:10 to 1:30 (minutes).

We also improve the logging, so it is easier to detect
toasterui errors.

(Bitbake rev: d42784432f927f58730caf80546c66772e0fec89)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN fc75011506 bitbake: toasterui: improvements in data reading
We add improvements in data reading, following
issues discovered in testing.

- elapsed_time is now read from buildstats
- we add safeguards to not fail logging if the build was triggered
with a toaster_brbe configuration, but it's running in
1.6 mode
- added log markups for build finish to let other programs
known when the work is done.

[YOCTO #6833]
[YOCTO #6685]
[YOCTO #6887]

(Bitbake rev: 0b225035cefee3d3713a93f9a432e5e4d4e174f1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Alexandru DAMIAN 2837b110ae bitbake: toaster: change startup parameter passing to avoid race
We avoid a race between the setting the TOASTER_BRBE variable
and reading the variable in toaster ui by supplying the variable
at server startup time through the toaster.conf post-read file.

Additional small changes are included, including marking the
build request with the environment id of where the build took place.

(Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:51 +00:00
Alexandru DAMIAN 4f1390cd23 bitbake: toasterui: save build id in build request on first chance
We change the saving of the build id to the build request as
soon is the build is created, as to allow for a consistent
display of build data while build is in progress.

(Bitbake rev: 9504ca6a69ba6da21f88b3cc77fa5910d886b6c3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:49 +00:00
Michael Wood 87dec81de6 bitbake: buildinfohelper: Make sure we use the orm defined value for loglevel
We need to consistently use LogMessage.INFO/WARNING/ERROR to make sure toaster knows
how to categories these rather than passing in the "raw" loglevel value
which in best case comes from python logging but worst case any value.

[YOCTO 6885]

(Bitbake rev: 3aa13bc1d8218c97c76581a895fa5f03ff807fbe)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:01:22 +00:00
Richard Purdie 438a508442 bitbake: hob: Fix sstate mirrors mangling
hob was adding the redundant characters "\1" in SSTATE_MIRRORS variable. If
needed it is expected the user will add this instead so remove the code
that was doing this.

[YOCTO #6600]

(Bitbake rev: 73bf120062fc00c7e26dc4e77a7d140658d89daf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie ff5fba8462 bitbake: knotty: Ensure commandline parameters are updated in memres server
When using options like -k, -f, -v and so on with the memory resident
server, they'd currently only be set on the initial values passed to
the original command. This ensures they now match those specified
on the commandline for the options where this makes sense.

To make this work, a command to update the options on the server side
is required so this is added.

[YOCTO #5292]

(Bitbake rev: 1c75cc4d0c8b606c1fe76e6bf60bf6a32298b105)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:06:06 +01:00
Dan McGregor 50a8400b72 bitbake: knotty: ignore interrupted system calls
With the improved exception handling added in an earlier commit bitbake
now stops when recieving a SIGWINCH. This happens frequently when
disconnecting and reconnecting tmux sessions and bitbake didn't survive.
Restore old behaviour of ignoring interrupted system calls but keep
proper exception handling for other errors.

(Bitbake rev: 418358a595c75f45b8d15160ec42bbe569562d91)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:33 +01:00
Alexandru DAMIAN 69955c7b42 bitbake: buildinfohelper: BuildRequest project file update soft linked
(Bitbake rev: 93887dadd5ee35557d320e96059c466d2e541065)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 7eb3e45a33 bitbake: toasterui: refactor log saving and save out-of-build errors
We refactor log saving to go through only one code path.

All logs that happened outside the build (i.e. before build
starting) now will be logged to either toaster_ui.log if the
build command ran in interactive mode, or to the build request
errors if the command ran in managed mode.

This enables proper display of error logs in project page.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:48 +01:00
Olof Johansson 91083de4cb bitbake: depexp: don't use undefined variable 'logging'
This fixes an issue when trying to use depexp without specifying a
recipe. Before change:

  $ bitbake -g -udepexp
  Traceback (most recent call last):
    File ".../bitbake/bin/bitbake", line 382, in <module>
      ret = main()
    File ".../bitbake/bin/bitbake", line 370, in main
      return ui_module.main(server_connection.connection, server_connection.events, configParams)
    File ".../bitbake/lib/bb/ui/depexp.py", line 201, in main
      logger.error(cmdline['msg'])
  NameError: global name 'logger' is not defined

After change:

  $ bitbake -g -udepexp
  Please specify a package name for dependency graph generation.

(Bitbake rev: 984ad90b2f1e29634dc79803a4a0404ab0534039)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Richard Purdie a4f077b1fe bitbake: knotty: Improve exception handling
Currently, IOErrors are just passed over due to the broken Exception
clause. A command like "bitbake X | <invalid command>" would break stdout
triggering a traceback. With these changes we print the exceptions, shut down
the server gracefully and exit which is a much nicer behaviour and is less
confusion to the user.

(Bitbake rev: 9544108f7b413038d871ce6ca88232de2f2434d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Namhyung Kim 70d0316d57 bitbake: knotty: Move second event check into a proper block
so that it doesn't check it twice for non-empty events

(Bitbake rev: e304ace6d8f7d0808ee401b7c01146b2798a81b4)

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02 09:57:11 +01:00
Alexandru DAMIAN f4456df240 bitbake: toasterui: fixing event.data clash
This patch fixes a name collision on the event.data
in the MetadataEvent class. event.data is used in the
event system as a copy of "d" in certain situations,
and this collision triggered a bug leading to data loss.

[YOCTO #6332]

(Bitbake rev: 3f191b7cfe95aea4d4e96babf001d62d45dd3aaa)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 20:07:48 +01:00
Alexandru DAMIAN 1dcdd877c7 bitbake: toasterui: fix build - project identification
This patches fixes the build - project identification when
running under managed mode. The build is assigned to the
project from which it was triggered, and to the
build request, as to simplify relationships queries
 in the database.

(Bitbake rev: af1d3373706d365f9138caec110fcb20a5966b7b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-14 14:10:03 +01:00
Dave Lerner 6b62a0fd6e bitbake: toasterui: Show in the log that ToasterUi is ready to receive events.
Issue: TA53702

It was observed that a sequence in a script such as
   bitbake --server-only ..
   bitbake --observe-only ..
   bitbake <some target>
could generate events from the server to the observer before
the observer was ready to read the events, and the early events
of builds were consistently dropped.  Adding a "ready" note in the
log allows the script to scan for that message before proceeding
to building a target.

(Bitbake rev: 9949948f92bbe2717a05a380d3df63a332d39c9a)

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-14 14:10:02 +01:00
Alexandru DAMIAN e163522205 bitbake: toaster: build control functionality
We add the build control functionality to toaster.

* The bldcontrol application gains bbcontroller classes
that know how to manage a localhost build environment.

* The toaster UI now detects it is running under build
environment controller, and update the build controller
database and will shut down the bitbake server once
the build is complete.

* The toaster script can now run in standalone mode,
launching the build controller and the web interface instead
of just monitoring the build, as in the interactive mode.

* A fixture with the default build controller entry for
localhost is provided.

[YOCTO #5490]
[YOCTO #5491]
[YOCTO #5492]
[YOCTO #5493]
[YOCTO #5494]
[YOCTO #5537]

(Bitbake rev: 10988bd77c8c7cefad3b88744bc5d8a7e3c1f4cf)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-13 11:55:34 +01:00
Alexandru DAMIAN 36a5f66096 bitbake: toasterui: fix django settings environment value
Previously, the buildinfohelper only set a django settings module
environment variable if none were set.

This may lead to problems when the starting the toasterui
from an already existing Django environment.

As such, we always override the variable to provide the
correct name for the local Django settings module.

(Bitbake rev: 8271e61a2fbddd3fc49556829675478d7505d58f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:32:55 +01:00
Alexandru DAMIAN b68b74ddd4 bitbake: toaster: update toaster to run in managed mode
We disable bitbake self start to prevent race condition.

ToasterUI will shutdown the server when the build is done
if running in managed mode.

We fix usage of kill server flag in the bitbake binary.

(Bitbake rev: 30159dbda3a40fa596302f91c705cb5f148c97a9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:32:54 +01:00
Alexandru DAMIAN 506b5bd729 bitbake: uievent: retry on handler registration failure
The registration of a remote UI event handler may fail
if the server cooker is currently in some certain states.
This may happen, for example, when a remote UI is started
very fast after the bitbake server is started, and the
server hadn't time to finish initial configuration parsing.

Rather than fail outright, we have the remote UI event retry
registration for five time at one-second intervals,
in the hope it will succeed.

(Bitbake rev: c3d520c92ae4ae80d31926a416456df510654b6a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:32:54 +01:00
Alexandru DAMIAN e89db137f0 bitbake: xmlrpc: client - remove fatal errors
When we use the XMLRPC client API to connect to a bitbake server,
we want to receive errors from the API instead of having the
API exiting without warning.

Thus the "bb.fatal" calls have been replaced with "bb.warn" calls,
and we re-raise the original exception for handling by the
original caller.

The bitbake starting script has been modified to properly test
for failures in calling the client API and handle them.

Additional error handling added in the client, as to prevent
fatal crashes.

(Bitbake rev: eb63f08c33644f64752aaae2146a000956ce894a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-06 10:32:54 +01:00
Richard Purdie c0bdb8100f bitbake: knotty: Fix output printed to the user at debug log levels
If a user runs with the -v or -D options, its understandable they'd
expect to see log output from the workers yet right now a bug in the
log handling does not show this.

Fix the conditional to ensure such log output is shown on the terminal
when it has been requested. Ideally this data should always flow to
the logfiles but that is for another patch.

This also fixes the code to do what was always intended in the comments,
i.e. if the user specifies -D or -v, output is shown from the tasks,
otherwise notes are suppressed.

(Bitbake rev: 20a3c93d8572969e76563f29bff89400b93ffae7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11 13:15:12 +01:00
Peter Kjellerstedt 8f683bf782 bitbake: bitbake: knotty: Clear footer before outputting to stderr
With the recent change to split the log output to stdout and stderr,
error messages that appeared while the footer was printed got all
messed up. This was because the messages to stderr was output _after_
the footer, then clearFooter() tried to remove the footer but removed
the error message and parts of the footer.

(Bitbake rev: 4fafea4fa69542b491e84463f6eae0d5bf645673)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-08 18:05:26 +01:00
Irina Patru bbc9aafbbf bitbake: hob: add "recipes/images/" to BBFILES when Hob is launched
The path for "recipes/images/" was not added in BBFILES when Hob had
to search for an image recipe. Therefore, it could not find it and an
error occurred.
This path needs to be added when Hob is launched.

[HOB #6086]

(Bitbake rev: 35c67281775b08925957c32663d587d486944e0e)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-08 13:07:25 +01:00
Alexandru DAMIAN 53b781f41e bitbake: toasterui: save warnings from non-build context
Some warnings and errors may come from a non-build context,
and they were not saved, even if they were counted for the current
build.

This patch saves these messages in memory until we have the
entire build context available.

	[YOCTO #5642]

(Bitbake rev: fc7a74e7961775b5d7ff25298abed10138d24dc9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05 14:55:28 +01:00
Alexandru DAMIAN 1afb2a2620 bitbake: toasterui: avoid variable name conflict
We rename a local variable in as to prevent a conflict with
a similary named function parameter.

(Bitbake rev: f4e57f794651c4894600445e843ca9d5e104cd84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-05 14:55:28 +01:00
Marius Avram 07231022e2 bitbake: hob: fix customization of empty image recipe
This fixes a problem which happened when you tried to build an
image by selecting 'Start with an empty image recipe' from the
Image configuration page of hob.

The reason on of the bug was that the name of the resulting image
was threated the same way as ordinary custom images, when in fact
they should use the default name: "hob-image", because they do not
derive from any other recipe.

[YOCTO #6102]

(Bitbake rev: fa4ea3b4b40e7e9e6767e0cd51c6701e0af07135)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 15:07:01 +01:00
Cristiana Voicu f41241cecb bitbake: hob: adding INHERIT += " testimage " affects image recipes list
To find if a recipe is for an image, Hob checks if it inherits
image.bbclass. But when you add testimage in local.conf, this will
be added for each recipe, and it pass the test. Adding a "/" before
"image.bbclass", will check only for image.bbclass.

[YOCTO #6117]
(Bitbake rev: be8511c9d474c570f6ca7078e28919c8a5175a42)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 15:07:01 +01:00
Paul Eggleton 082a4170ac bitbake: toaster: fix mis-detection of targets as images
If you are using the testimage class then the old test mistook the
global inheritance of testimage.bbclass with the recipe inheriting
image.bbclass because it was only looking for that at the end of the
string.

Also tidy up the code so you an easily tell what it's doing. (The
original method may have been more "pythonic", but it does nothing for
readability.)

(Bitbake rev: b05e741cb5fe44b37538f2b727782f80dc9bb8fa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 11:53:52 +01:00
Paul Eggleton 432505d563 bitbake: toaster: fix help texts not showing for most tasks
These were not being collected properly because we were explicitly
excluding variables defined as functions from being stored in the
database. We don't want these to be shown in the variables list, and in
any case it makes sense for these to be stored elsewhere, so create a
separate model to store these.

Fixes [YOCTO #6050].

(Bitbake rev: 0d76a5461ce4bd554ff70a465064969e53edf0a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-04 11:53:52 +01:00
Cristiana Voicu fd4579e5f2 bitbake: toaster: use deploy_dir var to obtain the license.manifest path
[YOCTO #6051]
(Bitbake rev: 6dd8133b06bbda5cce50de39123f429a6a3f772d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-01 10:22:42 +01:00
Alexandru DAMIAN e1bfb5dd61 bitbake: toaster: update saving sstate task data
This is an update on the sstate file saving data.
It saves both found and missed sstate tasks.

(Bitbake rev: 60c577b1080219b795d3c8ab4e149e929cf9ce14)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-01 10:22:42 +01:00
Richard Purdie fc49a6f00f bitbake: server/xmlrpc: Simlify featureset handling
Rather than passing featureset around various places where the data doesn't
really belong, run a command at connection time to set the appropriate
features. This is similar to what the process server does.

(Bitbake rev: c3b5cc5691291c74dd315c4439c80e0e4b2b5c1d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-30 10:10:37 +01:00
Richard Purdie c4eeaa8e35 bitbake: knotty: Show a link to the logfile for failed setscene tasks
Its not immediately obvious to the user that a logfile exists for a failed setscene
task. Add code to knotty to display where that logfile is in those cases.

[YOCTO #6055]

(Bitbake rev: 0664fa15597785dd90cf205531a9801e6da6ba47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 10:42:08 +00:00
Richard Purdie 6ef47ec5fd bitbake: knotty: Split error output onto stderr
When using bitbake -e in scripts, it would be helpful if the error
output appeared on stderr, not stdout. This change enables that building
upon the new bb.msg filters.

[YOCTO #5274]

(Bitbake rev: ebb797fc5c37d729e3cc8b2dc7156287d385c13b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 10:17:20 +00:00
Richard Purdie 6f29f7d371 bitbake: knotty: Ensure the progress bar shows on stdout
I can understand why some programs would want the progress on stderr so
that real output can be captured on stdout. This is confusing for bitbake
since we don't show a progress bar at all in non-interactive cases.

Therefore make sure the progress bar goes to stdout, not the stderr default.

(Bitbake rev: 0529aa9966df5c56b07affe865efce18852efe5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 10:17:20 +00:00
Richard Purdie 8c1e43ca58 bitbake: cooker/event: Overhaul sanity test mechanism
Sanity tests are currently a pain as its hard to control when they run. This results
in issues where for example the bitbake -e output is not useful as the sanity tests
prevent it from executing. The sanity tests should run later than the base configuration.

This patch changes the sanity tests to always be event triggered with the option of
returning either events on the status, or raising errors. A new cooker feature is used
to change the behaviour depending on the controlling UI.

This does need a change to sanity.bbclass in the OE metadata but its worth the pain
for the increased flexibility and control this offers UIs and the improvement to the
user experience.

(Bitbake rev: 32e171bcc92c6e27fefee971e8714ddf8e1a8ac1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-27 09:42:08 +00:00
Marius Avram 41ed4123a6 bitbake: hob: fix set_extra_setting function
The function is used to save additional variables in the configuration file
when the user adds a new (key, value) pair from the Settings->Others. There
was a problem though when the function was trying to retrieve an older
instance of EXTRA_SETTINGS from the configuration file. Sometimes its value
was returned as a dictionary and sometimes a string, which caused a crash when
calling ast.literal_eval(). The reason of the problem must be a change in
bitbake's parsing system. The changes will fix this issues.

While analysing this problem I discovered that the variables were not saved
properly in the configuration file after consecutive changes to Settings->Others
because of the way saveConfigurationVar() from cooker.py works. This patch
will also solve this issue.

[YOCTO #5989]

(Bitbake rev: bdbcd8866104c315fc9da631407d4280433dbfde)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 13:26:55 +00:00
Alexandru DAMIAN 70f1a3db5e bitbake: toaster: clean exit on bb server shutdown
This patch adds the capability to have the Toaster UI
detect when the Bitbake server exited and cleanly
trigger a clean shutdown of the system through the toaster
starting script.

(Bitbake rev: a9cfa3eacfc99550e1ad3f8bb61b2a0bc9b44332)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 11:17:34 +00:00
Alexandru DAMIAN 1913a1751d bitbake: toasterui: save missed sstate tasks
We save the missed sstate tasks as tasks that executed
but have the sstate_result set to "SSTATE_MISSED", signaling
that the attempt to find an sstate file failed.

(Bitbake rev: 6f22e02614adcc642fe011e5e31ca4936d1cb19d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 11:17:34 +00:00
Alexandru DAMIAN 1d20fc44ea bitbake: toaster: select recipe based on PN name
When saving task stats, if there were multiple tasks executed
based on the same recipe file, we might have saved the stats
to the wrong task by selecting another recipe.

This patch takes the PN into account to properly select
the file stats.

A check is also made to make sure we don't fail saving
data due to interrupted builds.

(Bitbake rev: e855031410daf2b99a6ca40b70956fe67c96f71c)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 11:17:34 +00:00
Cristiana Voicu 9e376dbed2 bitbake: bitbake toaster: check the file_name with the content of the IMAGE_FSTYPES variable
File_name information of Target_image_file is being collected for a
.rootfs.manifest file. We would like not to collect this. The solution is
to cross check the information gathered for file_name with the content
of the IMAGE_FSTYPES variable. If any of the file_name entries does not
match the content of IMAGE_FSTYPES, we do not store it.

[YOCTO #5189]

(Bitbake rev: 017771ed0508b247edaf875789260906f44381f4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25 11:17:34 +00:00
Marius Avram 299fbbf31a bitbake: hob: output filenames based on initial recipe name
If a recipe for an image was edited from the hob interface the name
of the files outputed in the <build_dir>/tmp/deploy/images/${MACHINE}/ and the
temporary recipes from <build_dir>/recipes/images/ contained only the
generic name "hob-image". From now on both the temporary recipes and
the output from the deploy/ directory will contain the name of the base
recipe appended by the "-edited" suffix, in the case when a base image recipe was
edited. The base recipe can be a standard recipe (e.g core-image-minimal) or
a custom created and saved by the user.

For example, if core-image-minimal is edited the deploy/ directory will contain
core-image-minimal-edited-20140318-140428-qemux86.ext3 and the recipes/images/
directory will contain the recipe core-image-minimal-edited-20140318-140428.bb.

[YOCTO #5002]

(Bitbake rev: f34575809677dc52e1071a3ae3daebe92819cec0)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-24 17:54:46 +00:00
Alexandru DAMIAN 3175653fe0 bitbake: toaster: fix task elapsed time calculation
This patch restricts the elapsed calculation to just
the events that have the "time" parameter set.

This fixes an error where data was lost due to an exception
where invalid dictionary lookups were made on the wrong
events.

(Bitbake rev: fa9f4eb8784553deb782bff34c5e04012c2c52c9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 14:47:53 +00:00
Alexandru DAMIAN f191ab0198 bitbake: toaster: measure task duration with server-side timestamps
The buildstats and toaster use separate time markers to measure the
duration of task execution. This causes a mismatch in the time
measured by buildstats class and the time measured in toaster.

The solution implemented here is to timestamp the creation of
every TaskBase event on the bitbake server side and calculate
the execution duration as the difference between creation time
of TaskSucceeded and TaskStarted events.

Based on an original patch by Marius Avram.

[YOCTO #5485]

(Bitbake rev: 7a08282c074c264f414cf7665dc873f51245072c)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21 14:47:52 +00:00
Valentin Popa 1f16ca9fba bitbake: hob: sync after image deploy
Showing "Deploy image successful" after 'dd' returns
may determine the user to disconnect the usb stick even
though the writing operations are not finished.
This patch makes sure that the entire image is deployed
on the usb stick before the user is informed about any result.

[YOCTO #5892]

(Bitbake rev: cc98b19112ab875ebc7cb604cd96acadac4cbf21)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-17 15:57:35 +00:00
Alexandru DAMIAN be778cdded bitbake: toaster: improve recipe matching for native tasks
This patch improves the recipe matching algorithm for
for matching recipes for native tasks.

(Bitbake rev: c350e4924abab8688c539608fd7f3af687d7265a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-17 13:59:36 +00:00
Alexandru DAMIAN 513722d9ca bitbake: toaster: fix target file inode type information
This patches fixes the inode type saved when writing the
target file list information.

(Bitbake rev: 9f34a1c5e94d73cdba1def7059c60211514e054c)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-17 13:59:36 +00:00
Cristiana Voicu 5396191fed bitbake: toaster: add license manifest path to database
Based on image_name, the target is obtained, and the path
is added to the database.

[YOCTO #5649]

(Bitbake rev: 911b5191133956c30d53f57629c115db196b9ac8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-14 07:18:46 -07:00
Cristiana Voicu 839f30486e bitbake: toaster: populate target image file table
Using ImageFileSize Metadata event, the image output file and its
size are populated into target_image_file table.

	[YOCTO #5189]
	[YOCTO #5228]

(Bitbake rev: a0b06d362b9aa08fda293489467af343c6ca6de4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-14 07:18:46 -07:00
Alexandru DAMIAN 00ca499a98 bitbake: toaster: write files-in-image to the database
Adding code to write files-in-image data from the metadata
event to the database.

(Bitbake rev: f3a69ef7cc536a4b879d60936199a1002584c4f4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11 12:24:30 -07:00
Richard Purdie a445e03d8b bitbake: knotty: Remove latency when exiting
There is no point in waiting 0.25s for when we should be processing
the shutdown. This simply reordering removes latency from the
bitbake command.

(Bitbake rev: f147b41bcaf9d05b5ba3a70100f1ca799979aee7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-10 11:10:01 -07:00
Richard Purdie 75b9f93638 bitbake: knotty: Add missing continue statement for runQueueExitWait event
The continue statement was missing for this event and the event was then
listed in the "known safe to ignore list". Clean this up.

(Bitbake rev: c4ee342300bf905e6e3bef581c61b86289461536)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-10 11:10:00 -07:00
Richard Purdie a7bc031f84 bitbake: knotty: Deal with exceptions not resetting terminal configuration
When an exception occurred, the terminal parameters (such as echo)
may not be reset correctly. This change ensures they do get
atexit time in all cases, avoiding the terminal corruption issues
that could sometimes occur.

(Bitbake rev: e1d89166f2dfe46412ff9a5610dd57b0cef74fe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-10 11:09:58 -07:00
Alexandru DAMIAN d327013815 bitbake: toasterui: fix task identification
This patch adds extra checks when selecting and writing
task and recipe objects to the database.

The patch fixes several issues where tasks may have been
misidentified between virtual-native and target tasks,
or spurious task objects may have been created.

(Bitbake rev: a6e597e690b3c6c6fa2af6db8cd871c02fc80421)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:24:02 -07:00
Alexandru DAMIAN 3f16624485 bitbake: toasterui: fix status update on failed sstate tasks
This patch fixes a logical error when updating task information
based on the corresponding sstate task state.

(Bitbake rev: 777458a20a7f686881e525a4d81b286c486ead6a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:24:01 -07:00
Alexandru DAMIAN 24f0617e25 bitbake: toaster: update database schema
This patch updates the database schema to resolve a
number of issues discovered while implementing the
UI interface.

We do not expect that all the data will come in valid
at this point.

	[YOCTO #5453]
	[YOCTO #5833]
	[YOCTO #5836]
	[YOCTO #5811]
	[YOCTO #5812]
	[YOCTO #5820]

(Bitbake rev: f8ad96d10a095e21fd2ce424c45e17f54642fb54)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:24:01 -07:00
Alexandru DAMIAN 93aa4aba74 bitbake: toasterui: add asserts on expected values
We add assert statements that validate expectations of
correct values and context when the data collection code is running.

These checks will help pinpointing unexpected data or
call flows, reducing debugging time.

Also contains a couple of very small fixes discovered through
these checks, including a virtual:native conflict with
regular tasks.

	[YOCTO #5553]

(Bitbake rev: e2fbd5c6fa6b53514e2cb23d42aa639020d8a475)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:23:58 -07:00
Alexandru DAMIAN 0daa189028 bitbake: toasterui: task data structure in toasterui
We update the structure used to hold interm task data,
before it is written to the database, to lower the changes
of key collision.

This will also lead to a cleaner data structure and easier
inspection.

(Bitbake rev: 49cb9f543526a161bc4c097f94422ea08b491ef9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:23:58 -07:00
Marius Avram 1660519e5c bitbake: bb/ui: store_dependency_information optimization
This optimization is in support of the bug #5485. The function called
at the beginning of every build: store_dependency_information was taking
approximately 20sec and it was delaying the arrival of events from the
event queue. The change minimizes the calls to _save_a_task(),
reducing the time to half.

(Bitbake rev: b86fd2be40303d886fdb9ad3009355584d285acc)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:23:58 -07:00
Alexandru DAMIAN 6fc246232a bitbake: toaster: mark dependency packages
We need to mark the package entries that are
created solely for dependency tracking purposes.

In order to avoid altering the database schema,
we mark the dependency targets with size = -1, since
this is not a valid size anyway and makes for easy
filtering.

	[YOCTO #5803]

(Bitbake rev: d11ed273dd6c520b16e9ccfe79476f340006a55d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:23:57 -07:00
Alexandru DAMIAN 3d0bb418a0 bitbake: toasterui: adding new task outcome empty
In order to separate tasks with invalid states from the
no exec tasks, we add a new value OUTCOME_EMPTY for the tasks.

OUTCOME_EMPTY has the same value as OUTCOME_NA as to maintain
compatibility with already existing builds. New value for
OUTCOME_NA can be used to detect tasks with invalid states, i.e.
it should never appear after finishing a build.

Fixing noexec tasks outcomes.

	[YOCTO #5763]

(Bitbake rev: 475643ad78796835bf2e731b9d0fa5794ec80dd1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-09 12:23:57 -07:00
Cristiana Voicu 81f4dd661c bitbake: hob: append bbfiles to bblayers.conf instead of local.conf
[YOCTO #5118]
(Bitbake rev: 12946da1353dc35b5c1c4ce56315408f4f5c1edf)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28 14:48:40 +00:00
Cristiana Voicu 2557667aa0 bitbake: hob: remove the code that adds hob layer to bblayers
[YOCTO #5118]
(Bitbake rev: ef32d27b33477a5cbf127cc8b98012b48e89ad07)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28 14:48:40 +00:00
Cristiana Voicu ed19ed0db1 bitbake: hob: create a base hob image used to create custom images
In order to remove hob-image.bb from meta-hob, a hob-image.bb should
be created somewhere in the build directory. I've saved it in build/recipes/images
directory, and moved the templates to recipes/images/custom (here are those
templates saved by the user).
The image is created when hob starts. Also it appends to BBFILES the directory
where it is created.

Removed images directory from meta-hob.

[YOCTO #5118]
(Bitbake rev: 4587297b51b7ca71d314bdb2c06f2061e7d4aa7d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28 14:48:40 +00:00
Cristiana Voicu 72576e2d04 bitbake: hob: replace the use of hob-toolchain with populate_sdk task
Now bitbake has an API to run individual task for targets.
Hob can use this to build the sdk, instead of using the hob-
toolchain.

(Bitbake rev: 4a5009036e9cb38f6e0260a88278948931073bc6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25 08:06:11 +00:00
Irina Patru 9a46332aa0 bitbake: hob: No need for enable_proxy and same_proxy in conf file
Hob doesn't read these variable from file and bitbake doesn't use them,
so they shouldn't be set in conf file.

(Bitbake rev: a8c9df86b96e27dc49028c2da42034d13988960c)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:57 +00:00
Irina Patru 914e50e5ea bitbake: hob: Don't always save proxy values in conf file
If enable_proxy is not activated, Hob should not save the proxy values
in the conf file when user hits save button.

[ HOB #5308 ]

(Bitbake rev: fbe0851221ecfcefea5bdd4b629a05ed4f5ac189)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:57 +00:00
Irina Patru d24611228e bitbake: hob: don't display interruptions as fails
When Hob receives a bb.command.CommandFailed event, it should check if
it's a log kind of information.
"Forced shutdown" and "Stopped build" are messages that show when a build
is not complete, but Hob considered them error.

[HOB #5609]

(Bitbake rev: ea1939f7ec8d8a71ce16a60c251c2413d7d91eb3)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:57 +00:00
Irina Patru 1b6e11cdcb bitbake: hob: unsetting busy cursor after hitting Stop button
The busy cursor would never change after pressing Stop button.
It should be set after the possible return inside machine_combo_changed_cb()
method.

(Bitbake rev: d440d3ad4b2d99bc20e06d2d5f5e76d07864dff3)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:57 +00:00
Irina Patru f43c2d8d79 bitbake: hob: change error_msg for CommandFailed event
When a bb.command.CommandFailed event is received by Hob, the error
message is stored inside event.error.
This information tells exactly why bitbake failed, so Hob should display
it instead of the current composed message.

(Bitbake rev: 24543ff6b45771712d624541ae35738d7d98f33c)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:56 +00:00
Alexandru DAMIAN e5b3918bb9 bitbake: toaster: fix package data gathering
Under OE-Core, the name under which a package would
be installed in a target may have been different than the
name under it has been built or recorded in the dependencies
listings.

This patch addresses the way that Toaster records package
names, and adds the field of "installed_name" to save the
name under which a package have been installed in an image.

(Bitbake rev: 24e0367429b248108b104ab5a2af05efcf7a8c39)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-27 21:01:07 +00:00
Alexandru DAMIAN b0b1acbe62 bitbake: toaster: Toaster GUI Build and Dashboard pages fixes
THis is a large set of fixes for the generic table, Build and
Dashboard pages.

Among the fixes:
* the table remembers which columns to show across refreshes,
based on saving the settings in a cookie
* added column timespent for a build which is  a denormalization
of the completed_on - started_on information due to limits in
computing datetime differences in the SQL engine
* fixed formatting of the time differences
* various sorting header links fixed
* correct error and warning CSS classes applied to the
respective rows
* fixes multiple divide-by-zero error in displaying duration
estimations

(Bitbake rev: 61e3dee55ac577fce1c0ae0fe7e0d3cf644e8ae6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-27 21:01:04 +00:00
Alexandru DAMIAN 731a0ac2c8 bitbake: toaster: update Task classification fields
This patch updates the task classification fields (outcome, etc)
as to

* Changes outcome names from SSTATE to CACHED and
from EXISTING to PREBUILT

* NoExec tasks now recorded as Not Executed / script type NA instead
of Executed / script type NOEXEC. Script type NOEXEC is deleted.

* SetScene tasks do not get order numbers

* New task method that returns a QuerySet for setscene tasks related
to this task: Task.get_related_setscene()

* New custom TaskManager that allows searching for setscene tasks
related to a certain task: Task.objects.related_setscene(task)

(Bitbake rev: a4164821a142f8b625a5fdc209adc6dc80874241)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-27 21:01:03 +00:00
Cristiana Voicu e3b9923921 bitbake: hob: after adding a layer, hob do not parse the configuration
Moved the parseConfiguration method before obtaining the machines and
other configurations from bitbake. If not, Hob doesn't see the new machines
added by the new layer.

[YOCTO #5632]
(Bitbake rev: 8de14b2a481d61424eb32fd0234f7a38a961a75b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:14 +00:00
Alexandru DAMIAN bb70ade1c3 bitbake: toasterui: fix version numbers for no PE specified
PE is an optional field in recipes specifiying the epoch
for the recipe. The canonical form for the
full recipe version string is: PE:PV-PR

If no PE is specified, we shouldn't store the initial ":"
character, as it leads to inconsistency with how the
version string is used elsewhere. This patch drops the leading ":"

    [YOCTO #5459]

(Bitbake rev: f6031bd753917c459ab232d88d7dcfc3f10e8184)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:13 +00:00
Alexandru DAMIAN 54d0e30433 bitbake: toaster: change package storage model
Up until this patch, package information lived in two
places - one table for build packages and one table for
target installed packaged. This situation leads to
two problems: there is no direct link between a build
package and a installed package, and a lot of data is duplicated.

This change unifies all package types in a single table.
The SimpleUI remains the same for continuity sake,
but the REST API will be changed in a future patch.

The package dependencies and package files are now
kept in a single table.

Since we collect target installed package information at all times,
we need to expand it to supplement missing information if a
package is not actually built in the current build.

Small changes to the Simple UI reflect the updated database schema.

    [YOCTO #5565]
    [YOCTO #5269]

(Bitbake rev: f5d655bfaeb349c8680d74530617e34aa389d1f0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:12 +00:00
Alexandru DAMIAN f8120984f4 bitbake: toaster: update build stats reading
In the processes of removing local system accesses
from toaster UI, we remove the build stats
code that was moved to toaster.bbclass, and
adapt the database writing code to read the data
from BuildStatsList event sent by the toaster.bbclass

    [YOCTO #5604]

(Bitbake rev: 4930ff5b471761c2a8d16c1935cdab9cf141d2d8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:12 +00:00
Alexandru DAMIAN ea307bbcff bitbake: toaster: move layer information reading code
In the processes of removing local system accesses
from toaster UI, we remove the layer data reading
code that was moved to toaster.bbclass, and
adapt the database writing code to read the data
from event sent by the toaster.bbclass

    [YOCTO #5604]

(Bitbake rev: 33b60a940f58e8374a8c7baa9bf28a98f54cdf13)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10 11:16:12 +00:00
Cristiana Voicu 5301c59503 bitbake: toaster: exclude "set in documentation.conf" from variable history
That has no impact on the builds themselves, so we should just
remove that line from the variable history.

[YOCTO #5561]
(Bitbake rev: ae0ed55e80b7bd30c775b128b4114b306a50ff69)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 16:27:13 +00:00
Cristiana Voicu 2bd4c2be9f bitbake: hob: changes to INHERIT var should use "append" operation
Setting INHERIT var means to remove other operations made on INHERIT.
This is too intrusive, so we decided to use append for this case.

[YOCTO #5448]
(Bitbake rev: a2d0122c198ee50325e6f0e2f5d1c2284475fc7b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 16:27:13 +00:00
Valentin Popa c51730aaa9 bitbake: Hob: check if warnings are related to package build
If warnings come from recipes parsing
and not from package build, 'parent' object
will be None; so don't update the color for it.

[YOCTO #5621]

(Bitbake rev: f9d24f55a5ffa9257e7ba3257be1210687513733)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Paul Eggleton 0a5fdfbf36 bitbake: hob: fix package property dialog for changes to FILES_INFO
The FILES_INFO structure is now much simpler, so remove all of the
horrible mangling we had to do here in order to read it.

(Bitbake rev: 11a664292064dbf76850bf21ba386f78a43a56b6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Paul Eggleton 27ae6871db bitbake: hob: name package files list variables appropriately
This treeview code was obviously copy-pasted from one of the config
dialogs and the variables were never renamed. Rename them now to improve
readability.

(Bitbake rev: 93b3ddad4396d757d1d0c199ac168f8b1a205fe3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Paul Eggleton 8a02406f1c bitbake: lib/bb/ui: handle PKGSIZE change to bytes
PKGSIZE is now in bytes in pkgdata, so we need to treat it as such in
the UI code for Hob / Toaster.

(Bitbake rev: 3b5ff814cd4a3efa4b17c6b343ec39c9acca5c9e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Richard Purdie d1e66643ae bitbake: cooker/command/hob: Cleanup configuration init/reset functions and commands
initConfigurationData and loadConfigurationData are similar functions, the only
reason for them appears to be to be able to reset the pre/post configuration
files. The current code is confusing and unmaintainable.

Instead this patch creates a new Sync command which allows these to be explicitly
set. The init and load functions can then be merged into one. There is then no
need for a parseConfiguration command, we can simply reset the server to have the
settings take effect.

The reset fuction is not an instant value return and triggers an event so it should
be an Async command, not a sync one.

The number of calls for the set pre/post command is probably higher than it
need be but someone with more familiarity with the hob code base can probably
figure out the right places its needed (maybe just init_cooker?).

(Bitbake rev: bae5210d7e048022f083361964ebec7daf1608f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Richard Purdie b8f0963592 bitbake: hob: Use BASEDATASTORE_TRACKING feature
Might as well use this functionality now we have it available.

(Bitbake rev: cd7f4d85e3f187140d1bb0aecf82f657a8f8701a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:54 +00:00
Paul Eggleton a17ffbdbb7 bitbake: hob: fix rotating progress icon animation
I've always found it somewhat annoying that this icon's rotation
animation wasn't quite correct; this was because it was looping around
to the second position instead of the first, which made it appear to
stutter.

(Bitbake rev: 78ad15b669b9c7cde41f7bd1ab884c1d2e0db91b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02 17:51:35 +00:00
Richard Purdie 35c25907a6 bitbake: imagedetailspage: Fix crash with more than 15 layers
If you had more than 15 layers the system would crash since one more
value is added to one array than the other. This fixes the code
so equal numbers of values are added to the arrays and hence
doesn't crash when many layers are enabled.

(Bitbake rev: 4e65463886a2ef245b2f8974e82e9cb942af224b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-02 17:43:22 +00:00
Cristiana Voicu fabdf2f57a bitbake: hob: disable layer drag and drop outside the containing widget
[YOCTO #5577]
(Bitbake rev: d39d957c77b9804670cad3bc9f7742084ead27e8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-30 22:26:30 +00:00
Yi Zhao 463e56ff2b bitbake: crumbs/builder.py: Fix typo for indefinite article
(Bitbake rev: bc3c69e50d36ea5e43f55f7b3b1ff3b0ab3696ee)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-27 14:43:33 +00:00
Valentin Popa 82ff33fc39 bitbake: Hob: force notebook refresh
Redraw the entire notebook widget after
number-of-issues drawable is incremented
(because for this case, the notebook widget
doesn't refresh it's children automatically).

[YOCTO #5596]

(Bitbake rev: 347b2ead091f00ee60703f6f3d17cfdd9075ac07)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26 23:01:33 +00:00
Valentin Popa 300b6f7f49 bitbake: HOB: Show warnings in Issues tab
Proper update of warnings view during build.

[YOCTO #3496]

(Bitbake rev: 124428ba8a0b1cc85d4b96053bf71bce14a5774c)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24 12:25:37 +00:00
Alexandru DAMIAN 725fae6581 bitbake: toasterui: fix typo
A typo in buildinfo helper leads to a bug where
information about tasks is not correctly stored.

This patch fixes the typo.

(Bitbake rev: 67b752993a2c64cba9ccc4fa662f0bddf081e74a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:06:49 +00:00
Alexandru DAMIAN e19ee57c96 bitbake: bitbake: cooker, toaster: mark interrupted builds as failed
This patch changes bitbake to log an error to the
command line when the build is interrupted via Ctrl-C.

This is needed to inform the user that not all tasks
required for the build have been executed, and
the build is not complete.

Internally, the Bitbake server will return a CommandFailed
event that will be logged by Toaster as build failure.

(Bitbake rev: 9a658e8b1511f1b9f91663f546f748fdfbc8965f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:05:52 +00:00
Alexandru DAMIAN 9fdd8adc17 bitbake: cooker, toaster: variable definition tracking
In order to track the file where a configuration
variable was defined, this patch bring these changes:

* a new feature is defined in CookerFeatures, named
BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING,
the base variable definition are tracked when configuration
is parsed.

* getAllKeysWithFlags now includes variable history in the
data dump

* toaster_ui.py will record the operation, file path
and line number where the variable was changes

* toaster Simple UI will display the file path
and line number for Configuration page

There is a change in the models to accomodate the recording
of variable change history.

[YOCTO #5227]

(Bitbake rev: 78e58fed82f2a71f052485de0052d7b9cca53ffd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:53 +00:00
Cristiana Voicu 51084379d4 bitbake: toaster: task with outcome 2 (sstate), should have sstate_result!=0
0 (not applicable) is not a valid sstate_result for tasks with
outcome 2 (sstate), which should return 3 (restored), 2
(failed) or 1 (missed).
Sstate_result for tasks with outcome 2 is equal to the outcome
of _setscene corespondent task.

[YOCTO #5220]
(Bitbake rev: 8ff8d75318ea88ba80c744b471e486901ef6749a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:53 +00:00
Cristiana Voicu 6f01250547 bitbake: hob/hoblistmodel: check if vals of packages/recipes names are not None
[YOCTO #5053]
(Bitbake rev: ba9fe77e37be31e8246431578902e871dd94515e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:53 +00:00
Cristiana Voicu 859b631b2f bitbake: hob: refresh tables when the user is redirected to Edit packages
When the build fails and I click "Edit packages", we should be returned
to the tab we launched the build from. Hob should remember the tab,
not the search state.

[YOCTO #5257]
(Bitbake rev: afdea16516084ef6c046d80e12bf244f25a9da50)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:52 +00:00
Alexandru DAMIAN 5f98364a62 bitbake: toaster: fix path to buildstats file
The buildstats file path changes based on the
optional PE variable that may be defined for a
recipe.

The toasterui simply ignored the PE value, and
as such it didn't correctly reach buildstats files
for some of the tasks.

This patch fixes the issue.

    [YOCTO #5073]

(Bitbake rev: 97b8ab88edc7c8dfb26b4cf305701ec96e52cc4f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:52 +00:00
Alexandru DAMIAN 533cf81f8b bitbake: toasterui: mark failed sceneQueue tasks as failed
This patch addresses an issue where a failed sceneQueue task
entry was not updated on the Fail event. As a result, it
always showed the task as not-available.

    [YOCTO #5216]

(Bitbake rev: 9b99a417f58381bac4bda412bcfd11de50403318)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:52 +00:00
Alexandru DAMIAN 9f1e696aba bitbake: toaster: remove author field
The AUTHOR field in most recipes is not defined,
or it's not really consistently set in the metadata,
Also does it seem particularly useful.

This patch removes the AUTHOR variable from the
toaster system

    [YOCTO #5449]

(Bitbake rev: da3ac049300be84defab7b32b0b99ab07c7d0a27)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-15 11:48:52 +00:00
Cristiana Voicu 8c534107d9 bitbake: toaster: convert build_package size to bytes to keep consistence
[YOCTO #5503]
(Bitbake rev: 19eb6e01b675c439ff0a817be6fa5e34ad42ba37)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-12 17:01:37 +00:00
Valentin Popa 67a7ac1ea7 bitbake: HOB: HIG compliant message dialogs
"More" HIG compliant dialogs for HOB.

(Bitbake rev: a1ccb5e70523be6af7f4bcaabd728af1ddaf6dc5)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:25:38 +00:00
Gary Thomas 34eb004435 bitbake: depexp: Improve wording on requirements
Since -g is required, tell the user exactly so.

(Bitbake rev: f05f74e98b0dd567a8b0cb85dc8183716619991b)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:25:37 +00:00
Alexandru DAMIAN 57498cede4 bitbake: toaster: fix target package information
Toaster needs to record information about packages
installed on a built target image, and dependencies
between these packages.

This patch fixes a bug where the variable from the
server wasn't read correctly leading which caused
the buildhistory to not be processed correctly.

Additionally, two display issues in the package table
were fixed, issues that lead to package information
being displayed incorrectly.

    [YOCTO #5197]

(Bitbake rev: ab4bc18409d80de6d069e3dd76c3c54964fe5764)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-05 12:50:44 +00:00
Cristiana Voicu 8cbd1ce1b8 bitbake: toaster: add variable description for prefixed/suffixed variables
In the Configuration table, we need to link prefixed / suffixed
variables to the corresponding variable descriptions in documentation.conf.

[YOCTO #5198]

(Bitbake rev: 641d9c4fda5fe978154fdfab978c3c09e3906eab)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 09:36:22 +00:00
Alexandru DAMIAN 85b9194171 bitbake: build, toaster: record proper task type
Bitbake tasks may be of type 'python' or 'shell',
or they may not be executed at all, which is record
as task type 'noexec'.

In order to record proper task type, this patch:

* creates no exec task type as the default value in
the toaster model definition

* adds full task flags to the bb.build.TaskStarted event
in build.py

* if the task actually starts, the toaster ui will
record the type of the task as either 'python' or 'shell'
based on the task flags.

[YOCTO #5073]
[YOCTO #5075]
[YOCTO #5327]

(Bitbake rev: 6648c57e6d369fc009ea3a9fe939def5d2c67bf5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 09:36:22 +00:00
Alexandru DAMIAN f04a32162d bitbake: toaster: fixes for null values from events
Some of the data values may come of as None through the event system,
and the UI would encounter a problem saving the Configuration.
It would be trying to save these values as NULL in the
database, which is not allowed.

This patch adds more verification for data coming through
the event system.

Other minor updates:
* update for the event model from toaster.bbclass
* minor code flow fix in the event system

(Bitbake rev: 03fafd086381723c6486522873671515824e49f2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04 09:36:21 +00:00
Cristiana Voicu f3541226b8 bitbake: hob: do not display the "Package list may be incomplete!" dialog
This dialog is not needed. Instead "Edit packages" button should
redirect to Packages list.

[YOCTO #5257]
(Bitbake rev: aa2e86a2ac28414f6d25fcd541a6ed2b50f15a2c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 17:59:31 +00:00
Cristiana Voicu fe3e26509d bitbake: hob: populate error_msg when hob receives a CommandFailed event
When Hob receives a bb.command.CommandFailed event, it doesn't show any error,
because the error_msg is empty. If so, it is hard to detect the issue, because
Hob continues to run till it blocks because of an information gap.

[YOCTO #5097]
(Bitbake rev: a5abd1826f34e6a7eefa837620b846e9b62ae758)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-01 17:59:31 +00:00
Alexandru DAMIAN 9a1dce10bd bitbake: toaster: add Toaster UI interface
Adding a new bitbake UI interface named 'toasterui'.

'toasterui' listens for events and data coming from a
bitbake server during a run, and records it
in a data store using the Toaster object model.

Adds a helper class named BuildInfoHelper that
reconstructs the state of the bitbake server and
saves relevant data to the data store.

Code portions contributed by Calin Dragomir <calindragomir@gmail.com>.

(Bitbake rev: 62200ff6694b21fbd5abf009a6f47ad93adf5309)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 11:13:49 +01:00
Cristiana Voicu ce0a6f81ae bitbake: hob: Hob should ask for ports only when Manual proxy is selected
[YOCTO #5307]
(Bitbake rev: 09b3e4e1e3fac737ea4069457e8bbffe1a4fe09d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-14 16:59:12 +01:00
Cristiana Voicu 5445f71fc8 bitbake: hob: change tooltip for live images
This change is needed to inform the user that selecting
live type means that the system will build a hddimg and iso
image.

(Bitbake rev: 5051f59976de4e099bb434aeea414de5a67a069f)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 16:25:02 +01:00
Cristiana Voicu ee7e64f116 bitbake: bitbake/hob: removing extra parameters from conf files using hob
In Hob settings, there is a tab to add/remove extra settings. This
patch implements a way to "remove" variables from conf files, through
bitbake. But, to keep the history assigment of the variables synchronized,
instead of removing, it replaces the lines with blank lines.

[YOCTO #5284]
(Bitbake rev: bd720fb63cef6b399619b8fbcaeb8d7710f2d6df)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Valentin Popa 45392cc67a bitbake: HOB: MACHINE should be saved in conf files using ?=
MACHINE var is saved using early assignment operator.
Calling  MACHINE=x bitbake core-image-... works properly.
Comment "#added by bitbake" is replaced with "#added by hob".

[YOCTO #5070]
(Bitbake rev: 2d0ec8ff083b636a6cf98de3278900eb95c3def6)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:33 +01:00
Valentin Popa b43c8126de bitbake: HOB: Busy cursor when saving configuration
Display a busy cursor while the configuration is saved.

[YOCTO #4846]
(Bitbake rev: fdb2e0120f189e97b8fdb6eb72d77a3100ba3018)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:58 +01:00
Cristiana Voicu 3c41bea907 bitbake: hob: populate "Save image" dialog when saving changes to a custom image recipe
If my build starts from a YP standard image recipe, the 'Save image
recipe' dialog should be empty.

If my build starts from a custom image recipe, the 'Save image recipe'
dialog should populate the 'Name' and 'Description' fields with the values
set for the custom image recipe.

[YOCTO #5004]
(Bitbake rev: 10757c529fe0b4b9a39740d269831347a3aab4a0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:45 +01:00
Alexandru DAMIAN 24ae636fde bitbake: bitbake: event: adding generic event for metadata usage
Adding the generic bb.event.MetadataEvent that is
targeted specifically at metadata usage. This is
needed in order to let the metadata code send and receive
events during asynchrous execution without having
to define each event specifically in Bitbake.

Metadata code should subscribe to and fire the MetadataEvent
in order to communicate asynchronously, and identify
the object using event.type field, and parse the
data in the event.data field.

Knotty UI will ignore these event by default.

This deprecates RequestPackageInfo/PackageInfo, and that
event pair will be removed in the future.

(Bitbake rev: ae1ea51aaab73e010d1c3db39df058bebebc11dd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN 0c51d610e1 bitbake: bitbake: cooker: get extra information from recipe cache
The loaded cache modules may add extra attributes to
the recipecache, that will be populated by the cache
classes required by the UI. These attributes
will be used by the UI to display relevant information.

Adds cachefields cache class field to specify
for each cache class which attributes will be set
in the recipecache.

Adds code to automatically expand depends tree with the
fields exported by the extra cache class.

Fixes a cache field name in the HOB UI.

(Bitbake rev: 47c171005fb3803d936e65fcd4436c643883ae16)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN ba83eb315d bitbake: bitbake: cooker,xmlrpc,servers: implement CookerFeatures
Implementing feature set selection that allows a client
to enable specific features in the server at connection time.

Only enabling of features is supported, as there is
no way to safely remove data loaded into the cooker.
Once enabled, a feature will remain enabled for the
life of the cooker.

Client-server connection now supports specifying the feature
set required by the client. This is implemented in the Process
server using a managed proxy list, so the server cooker
will now load dynamically needed features based on what client
connects to it.

In the XMLRPC server the feature set is requested by
using a parameter for registerUIHandler function.
This allows observer-only clients to also specify features
for the server.

The server code configuration now is completly separated
from the client code. All hardcoding of client knowledge is
removed from the server.

The extra_caches is removed as the client can now specify
the caches it needs using the feature. The UI modules
now need to specify the desired featureSet. HOB is modified
to conform to the featureSet specification.

The only feature available is CookerFeatures.HOB_EXTRA_CACHES
which forces loading the bb.cache_extra:HobRecipeInfo class.

(Bitbake rev: 98e594837aab89ea042cfa9f3740d20a661b14e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:43 +01:00
Richard Purdie 926b60f6e4 bitbake: knotty: Cleanup error/interruption handling
Only display a CommandFailed ERROR: message if there is an error to display.

Only display an errors summary if we actually displayed errors.

(Bitbake rev: 568ea00acd226d48e725bb01d4f8c410ed1eaa61)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:20:38 +01:00
Richard Purdie 7663a52061 bitbake: cooker: Rename confusing 'stop' state to 'forceshutdown'
The shutdown state causes the server to finish what its doing, stop was
them meant to completely stop it. It doesn't mean the server is stopped
though. Renaming the current stop event for forceshutdown gives more
meaning to what it actually does. The stopped namespace then becomes
available to indicate a completely stopped server.

(Bitbake rev: 12e9d33bfae5294e3870dfd1202f63383ad05e92)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:20:38 +01:00
Richard Purdie b093b6c524 bitbake: knotty: Reduce refresh of footer
When displaying larger number of events the client can get caught up in displaying
the footer, then immediately overwriting it. To avoid this, wait for pauses
in the event stream before displaying the footer to give a slightly more
friendly feel to the UI.

(Bitbake rev: 5d706c7cd6ee8d83b67ff18312d4c8119bea8878)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 22:31:33 +01:00
Cristiana Voicu c8957a4fbe bitbake: hob: remove custom image from the images list when not needed
Selected custom image recipes should be cleared from the combo the moment
you change your selection. The idea is to always perform the selection of
those images in the same way (i.e through the "Select from my image
recipes" option).

[YOCTO #5001]
(Bitbake rev: 94483ee5ae9f4051bccd660c4718c36564e17161)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 22:31:33 +01:00
Cristiana Voicu b501b832eb bitbake: hob: limit the description size when a custom image is saved
[YOCTO #5003]
(Bitbake rev: 9aec9ee41d4d893325d9bf92b8a53f2e68e4973d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-06 22:31:32 +01:00
Cristiana Voicu f41b7a7d4d bitbake: hob: remove PACKAGE_INSTALL variable setting from hob
Before saving the packages for a custom images in a .bb file,
the packages were saved in bitbake memory. Now all the variables
are saved in conf file, so saving PACKAGE_INSTALL is not needed anymore.
Moved were LINGUAS_INSTALL is set, because both conditions are for testing
if a custom image is saved.

[YOCTO #5101]
(Bitbake rev: 8757f962b92e7668f40d2d8bd9e762b152f91f7b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-04 14:18:49 +01:00
Cristiana Voicu 1472b9ebff bitbake: hob: fixes for image combo box
When an image from scratch is selected, and recipes parsing
is canceled, the image shown by the combo box isn't correct.

[YOCTO #5000]
(Bitbake rev: f8166ace0bd9155199166990ce15da24eb2e793b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-27 11:47:35 +01:00
Cristiana Voicu 39052cd703 bitbake: hob: add event handlers filtering in Hob
Create the _evt_list for hob; it is longer than the knotty
uses because it handles more events.

(Bitbake rev: 715aed74f972bb6e9b6a5130ca9ede48d4f79f0a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-27 11:16:58 +01:00
Richard Purdie 69aab78dd8 bitbake: bitbake: Add ui event handlers filtering
Add functionality to allow UIs to update and change the types of events they
recieve. To do this we need to add a new command and also need to be able
to obtain the current event hander ID. In the case of xmlrpc, this is
straightforward, in the case of the process server we need to save the result
in a multiprocessing.Value() so we can retrive it. An excplit command
was added to the server API to facilitate this.

The same function can also be used to mask or unmask specific log messages,
allowing the UI to optionally differ from the standard set of message
filtering.

Based upon work by Cristiana Voicu <cristiana.voicu@intel.com>

(Bitbake rev: ba5a6c88785d9889d4172ec79937ac2a5555327e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:29:46 +01:00
Cristiana Voicu 136cb5e6b8 bitbake: hob: changes to image combo box from image configuration page
In some cases when a new machine is selected, the image combo
shows the same option. Fixed this issue, because the image
combo box should be reseted.

Fix the counter for the options in the combobox. This bug
was introduced by the templates functionality. The combo box had some
last changes, and I forgot about this counter.

[YOCTO #4858 & #5000]
(Bitbake rev: 457fd80ee6b1b2bcef463e3a83e048da2f8bf805)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 12:51:59 +01:00
Andrei Dinu 8d1e77ec31 bitbake: propertydialog.py : Scrollable windows for long tooltips
In some cases, the length of the description and the brought
in by field was too big. That led to the size of the property
dialog exceeding Hob's size. For long tooltips we use
scrollable windows now.

[HOB #4321]

(Bitbake rev: 78ecabf19bf01e5a662b6e2b865cd93bf47d962b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 12:38:12 +01:00
Cristiana Voicu 1b3f8ac9cf bitbake: hob/retrieveimagedialog: change labels
Some labels needed to be changed in order to respect the convention.

[YOCTO #4999]
(Bitbake rev: 110b485eac6adea242297b7942da8710403c465a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:21:03 +01:00
Paul Eggleton 840a427ed2 bitbake: taskdata: report close matches with NoProvider errors
Assuming there is no known reason why an item is not provided, show
close matches on the assumption that it might have been a typo or
other mistake.

(Bitbake rev: ed81b0856b4a3892b53d39871eaaa6273390ea75)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:21:02 +01:00
Richard Purdie 712622e2db bitbake: hob: Add missing file from previous commit
This should have been part of 'hob: implement the "retrieve image dialog" +
changes to image combo box' but got lost in the merge process. This adds
the missing file.

(Bitbake rev: 0eadcc073f270c0b323955cf7719b77195cf4890)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 10:23:32 +01:00
Ross Burton 89f42c9dcb bitbake: depexp: fix typo in variable name
(Bitbake rev: e3b8585738abea96a9fd1d1204731004a35e0bc9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:27 +01:00
Ross Burton 44db452d8f bitbake: depexp: insert data instead of append/set, for speed
(Bitbake rev: 9f50a841f4929e68333ccf2ace32f5d3ca1e7d0d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:27 +01:00
Ross Burton 3412a89dfd bitbake: depexp: make parse() a member function
(Bitbake rev: e5709f2b5592eb6448c7d10b9aeb7cf3bef4864e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:27 +01:00
Cristiana Voicu e76fdac6f1 bitbake: hob/imageconfigurationpage: changes to image combobox
Place the "Create your own image recipe" field to the
end of the image recipes list.

[YOCTO #4193]
(Bitbake rev: 288bbda31164efffd07a370a728a7682db775c08)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:27 +01:00
Cristiana Voicu 4182c53e56 bitbake: hob/imagedetailspage: add tooltip for save image recipe button
[YOCTO #4193]
(Bitbake rev: de3cb77ec7ceb8e0671cf3edfd3713f907d1d0bc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:27 +01:00
Cristiana Voicu 8db39d2f66 bitbake: hob: set focus on entry name when the name is not correct
[YOCTO #4193]
(Bitbake rev: bbae370bc57296723cc87e48d64da79882f1e5b6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:26 +01:00
Cristiana Voicu c83f8185a8 bitbake: hob: implement the "retrieve image dialog" + changes to image combo box
Tha changes related to the image combo box are related to the
action done in the retrieveImageDialog. When the user wants to select
a customize image, but then he cancels the action, the combo box is set to
--select a base image--.
If the user selects an image using the new dialog, a new item with its name
is added to the combo box list and then it is activated.

[YOCTO #4193]
(Bitbake rev: f25322de7e47719b31808397174e5c4f6d8649f2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:26 +01:00
Cristiana Voicu 42a4f33fc0 bitbake: hob: retrieve file name of an image
The entire file name (with the path) is needed to know
if the image is located in the "build" directory or it comes
from layers. According to this information, the image is placed
differently in the combobox.

[YOCTO #4193]
(Bitbake rev: 7d15eccc25b6c96851e4d01401f9f9b7821730b1)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:26 +01:00
Cristiana Voicu 4640fd053b bitbake: hob: changes to image combo box
Added an item for the custom images.
Added a separator in the combo box.

[YOCTO #4193]
(Bitbake rev: 1eed84c11269c25c13bb444871d84c5dfeabcb73)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:25 +01:00
Cristiana Voicu 08ccfacbc1 bitbake: hob: the saved image should be editable
Also, the image can be saved when the a name is filled.

[YOCTO #4193]
(Bitbake rev: 0edad0ab3ccd165125726d2aa3dfeb19dad246c9)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:25 +01:00
Cristiana Voicu 3bef5a75d6 bitbake: hob: change the name and description for the saveimagedialog
The image name and description should be saved for a future
save.

[YOCTO #4193]
(Bitbake rev: 6dc0fc243ac6046714523d08df4d8f88c48698cc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:25 +01:00
Cristiana Voicu bb8a265b0f bitbake: hob & bitbake: append a value to a variable from hob throught bitbake
It was necessary to append ${TOPDIR}/recipes/images to BBFILES.
Implemented the mechanism to append a value to a variable: a command and
the method in cooker.

[YOCTO #4193]
(Bitbake rev: 4aedbee90bd92395c2460a68702e6ede00e256c9)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:24 +01:00
Cristiana Voicu 116219ce09 bitbake: hob: make changes in order to permit from UI to edit an image after saving it
Added the image name to the list model, in order to show the image name as
the user named it.

[YOCTO #4193]
(Bitbake rev: 0aba493103d1fe50026a47db16529febbbbd77a2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:24 +01:00
Cristiana Voicu 564c83be5e bitbake: hob/bitbake: save the description of a custom image
When an new image is saved, the dialog for this action has
a field for the description. Changed how an image is saved, by
appending the DESCRIPTION variable at the end of the .bb file.

[YOCTO #4193]
(Bitbake rev: 5629007f2b984005e3a8ac5d9b71422cbc2f1409)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:24 +01:00
Cristiana Voicu 140744c470 bitbake: hob/bitbake: create a template (a .bb file) from hob through bitbake
Modified generateNewImage function from cooker, in order to be used to
save a template in Hob.
Created a command to ensure that some dirs are created. The templates
(recipes) will be saved in {TOPDIR}/recipes/images folder.
Called these methods from Hob.

[YOCTO #4193]
(Bitbake rev: 96ffa00945c7eb09a0132fa47159aef3ef20fb3e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:24 +01:00
Cristiana Voicu ee4fe5a229 bitbake: hob: create save image dialog used to save a template
Implemented a new dialog used by Hob. This dialog was desinged
in order to permit to save only in a particular directory.
Also, it has a field where the user can type a description
for the image.
Implemented in the handler a method to retrieve the topdir variable,
because the changes will be saved in {topdir}/recipes/images directory.

[YOCTO #4193]
(Bitbake rev: 117d4809a62e28ffe7e9dcda5433993d76f7d934)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:23 +01:00
Cristiana Voicu 843ef10832 bitbake: hob: labelling changes in Hob
When the design document for templates in Hob was created, we've noticed
that some labels need to change.

[YOCTO #4193]
(Bitbake rev: fcbadbb73a8a94a3d5e330e1a5fa9550130d2c62)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:23 +01:00
Cristiana Voicu adcce841b4 bitbake: hob/packageslist: change image size label to estimated image size
On the "Edit packages list" page, the image size may be computed before
building. We didn't find another way to give a more accurate size, so
we have agreed to inform the user that this an estimated size.

[YOCTO #4388]
(Bitbake rev: 136eda2dcbc32aba4f59783049352dc1375cc945)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:23 +01:00
Cristiana Voicu 4c96451fa5 bitbake: hob/advancedsettings: change toolchain labels to sdk labels
In order to be easier for the user to understand, we have changed the
toolchain labels to sdk.

[YOCTO #3808]
(Bitbake rev: 008afbcf6b1b315eb5463ecfb39fc50e6303687e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-06 13:02:23 +01:00
Cristiana Voicu 0e9049a011 bitbake: hob: sstatemirror is standard also for file://.* regex
(Bitbake rev: 2e3c87569a8c40f7a2ebda22b01eee3bb7c96d1d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:08 +01:00
Cristiana Voicu e28904e1de bitbake: hob: changed the split of SSTATE_MIRRORS variable
Until now the split made searching the string "file://", but
this is not ok when SSTATE_VARIABLE has the following form:
SSTATE_MIRRORS ?= "\
     file://.* http://someserver.tld/share/sstate/PATH \n \
     file://.* file:///some/local/dir/sstate/PATH"

In the documentation I've found that \n is the list separator.

[YOCTO #4857]
(Bitbake rev: 73bcd96928cb2df390e1fc6d3a8b7ce3e9d546a4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:08 +01:00
Valentin Popa dc86293f04 bitbake: HOB:Proper handle of SIGINT
Modal dialogs doesn't run on the main loop so they cannot
catch any signal from the terminal. This patch makes sure
the dialogs are destroyed when a SIGINT is sent to HOB.

[YOCTO #3329]

(Bitbake rev: 6eee0cc37438cc3f91531b7df524330fba27161b)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:52:48 +01:00
Cristiana Voicu 8a186a6b38 bitbake: hob: save button from settings called a nonexisting method
The method was removed when the process for saving configuration
in Hob was changed. Replace the call with the right function.

[YOCTO #4793]
(Bitbake rev: b6aa2b63d71cbe82850a375381b2dbc750cf1905)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-03 08:13:35 +01:00
Cristiana Voicu 78bcf871c6 bitbake: hob: save variables in conf/ directory
Until now the variables were saved in bitbake configuration,
now they are saved in configuration files, in order to be read by
bitbake-worker. This helps to assure the consistency for the rest
of the variables.

(Bitbake rev: ea65ebf43525f173205183aa2fd5d8db303ffd4a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 16:26:22 +01:00
Cristiana Voicu f3246953c2 bitbake: hob: replace the init cooker with reset in order to keep the history
When the cooker initialization is called, the variables history is lost.
It need a reset, in order to load the configuration files.
Also, concatenated the value for INHERIT variable.

(Bitbake rev: 2b8c0c09e09ab69edc53501b84050c797f0686e4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 16:26:22 +01:00
Cristiana Voicu 77264ca2ea bitbake: hob: check if imageconfiguration page has the attribute 'warnings_bar'
[YOCTO #4571]
(Bitbake rev: 53c6b65bbcd5a6d3caed8581533f31ac373163a7)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Cristiana Voicu 01f9d1b338 bitbake: bitbake & hob: modify some commands and call them from hob
This patch adds a new command to create an extra configuration
file, in order to create it from Hob.
Also, it calls the enable/disable data tracking when needed.
Modified the prefiles and postfiles variables because the cooker
expects some lists.

(Bitbake rev: 92393701adcfa181a1090e3632bc6df7ee7852e6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Cristiana Voicu 64eda3e058 bitbake: hob: remove the rest of the old template functionality
Until now, some configuration settings was saved in a hob specific
directory. From now on, it will be saved in conf directory through bitbake.

(Bitbake rev: c53e902b010d1c3f1550f7e60e744f40120f73c2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:56 +01:00
Alexandru DAMIAN f5cadbe005 bitbake: knotty, bitbake: add option to terminate a remote server
I add an option to terminate a remote server gracefully
as not to need a kill command.

(Bitbake rev: 7495f835666a9561c2c7d84da7aaa74e4df55b9a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:09:10 +01:00
Alexandru DAMIAN 3ea9d647ec bitbake: knotty, xmlrpc: add observer-only mode
I add an observer only mode for the knotty UI and
the XMLRPC server that will allow the UI to register
a callback with a server in order to receive events.

The observer-UI is able to send read-only commands to the
server, and also is able to register as an event handler.

Read-only commands are the commands that do not change
the state of the server and have been marked as such in
the command module.

The observer can switch to a full client if it calls addClient
at any time, and the server has no other client running.

(Bitbake rev: 4de9ee21f1fa4d04937cc7430fb1fc8b7a8f61e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:09:10 +01:00
Richard Purdie b87429fdb4 bitbake: Add missing file that went out of sync
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-12 13:13:21 +01:00