]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
9 years agoUpdate version to 1.30.0
Richard Purdie [Wed, 6 Apr 2016 22:31:27 +0000 (23:31 +0100)] 
Update version to 1.30.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: update LICENSE file with QUnit details
Elliot Smith [Wed, 6 Apr 2016 13:49:13 +0000 (14:49 +0100)] 
bitbake: update LICENSE file with QUnit details

QUnit is now included in Toaster's test suite and distributed
with its source code.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotests: browser Add test to run the js unit tests
Michael Wood [Mon, 4 Apr 2016 10:52:49 +0000 (11:52 +0100)] 
tests: browser Add test to run the js unit tests

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: views jsunittest Add MACHINE and an extra layer to test project
Michael Wood [Mon, 4 Apr 2016 10:47:31 +0000 (11:47 +0100)] 
toaster: views jsunittest Add MACHINE and an extra layer to test project

Add set a MACHINE if needed and add a layer. When we're running in the
context of the django unit tests we don't have these defaults setup for
the project so add them.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Set MACHINE for the test projects
Michael Wood [Fri, 1 Apr 2016 10:47:32 +0000 (11:47 +0100)] 
toaster: tests Set MACHINE for the test projects

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add quint to project so that it can be used offline
Michael Wood [Fri, 1 Apr 2016 10:32:35 +0000 (11:32 +0100)] 
toaster: Add quint to project so that it can be used offline

Currently we're using a hosted version of quint however this means that the
testing has to be online or have a cached version of quint. Add the
files to Toaster to be able to use offline.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add rev dep column to image detail pages
Dave Lerner [Wed, 6 Apr 2016 13:44:41 +0000 (14:44 +0100)] 
toaster: add rev dep column to image detail pages

Add a column to the custom image pages that shows the reverse
dependencies in a format matching the dependencies column:
  - either blank or a button showing the count of reverse dependencies,
  - when the button is clicked, a popover appears showing the list
    of reverse dependencies, with each package's size, and the total
    size of all of the reverse dependencies.

The implementation adds a packages table method to retreive the reverse
dependency total size, and adds a separate 'popover' html template. Both
of these changes follow the pattern for the dependencies column.

[YOCTO #9163]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuildinfohelper: work around unicode exceptions
Joshua Lock [Wed, 6 Apr 2016 12:50:23 +0000 (13:50 +0100)] 
buildinfohelper: work around unicode exceptions

We have been seeing UnicodeDecodeErrors when handling the
ImagePkgList MetadataEvent in ORMWrapper's
save_target_file_information() if the event includes filenames
that include non-ASCII characters.

In the short term work around this by converting paths to the
unicode type when passing them to Django's ORM. This is a bit of
a hack but it's too late in the cycle to do anything more invasive.

[YOCTO #9142]

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoasterui: update build in internal state
Ed Bartosh [Wed, 6 Apr 2016 16:46:48 +0000 (17:46 +0100)] 
toasterui: update build in internal state

buildinfohelper stores current Build object in its internal
state. Any changes to Build object will be lost if internal
state is not updated as current buildinfohelper code
saves Build object from internal state when build is
completed.

This bug causes incorrect build state when build is cancelled.
Updating internal state should fix it.

Note, that this commit updates internal state after status of
the build is changed to Build.CANCELLED. There are several other
places in the code where Build object is updated without updating
internal state. They should be carefully analyzed and fixed.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuildinfohelper: fix KeyError
Ed Bartosh [Wed, 6 Apr 2016 16:46:47 +0000 (17:46 +0100)] 
buildinfohelper: fix KeyError

When bitbake doesn't need to build anything it still sends
ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata'
fields. This causes crash in buildinfohelper code as it's assumed
that above mentioned fields always have data keyed by build target:

ERROR: u'core-image-minimal'
Traceback (most recent call last):
  File "toasterui.py", line 423, in main
    buildinfohelper.store_target_package_data(event)
  File "buildinfohelper.py", line 1218, in store_target_package_data
    imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target]
KeyError: u'core-image-minimal'

Fixed this by using dict.get method with empty dictionary as default
return value instead of trying to get value without checking if target
key is in the data.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get bitbake location from BBBASEDIR
Ed Bartosh [Wed, 6 Apr 2016 16:46:46 +0000 (17:46 +0100)] 
toaster: get bitbake location from BBBASEDIR

It was incorrectly assumed in the current code that bitbake is in
../bitbake/bin/ directory. It's not always the case.
Using bitbake from $BBBASEDIR should be .

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: export BBBASEDIR variable
Ed Bartosh [Wed, 6 Apr 2016 16:46:45 +0000 (17:46 +0100)] 
toaster: export BBBASEDIR variable

This variable will be used in localhost controller code
to determine correct bitbake location, so it has to be
exported.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: update projectconf.html for DL_DIR and SSTATE_DIR
Sujith H [Wed, 6 Apr 2016 16:46:44 +0000 (17:46 +0100)] 
toaster: update projectconf.html for DL_DIR and SSTATE_DIR

Modified the projectconf.html to include DL_DIR and
SSTATE_DIR. Updated the script section in the html
to handle the changes made by the user on DL_DIR
and SSTATE_DIR. Included validation check for the
folder names.

[YOCTO #8422]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: update view to support DL_DIR and SSTATE_DIR
Sujith H [Wed, 6 Apr 2016 16:46:43 +0000 (17:46 +0100)] 
toaster: update view to support DL_DIR and SSTATE_DIR

Update toaster's views.py to support DL_DIR and SSTATE_DIR for
page projectconf.html. Removed DL_DIR and SSTATE_DIR from
blacklist. Initial value of DL_DIR and SSTATE_DIR comes from
BuildEnvironment.

[YOCTO #8422]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use empty token
Ed Bartosh [Wed, 6 Apr 2016 16:46:42 +0000 (17:46 +0100)] 
toaster: use empty token

If client xmlrpc token is not provided in the command line, bitbake
generates random token. Server token in --server-only mode is always
empty. This doesn't allow clients with non-empty tokens to connect
to the server. Specifying empty token should stop generation of
random token and make it possible for clients to communicate with
the server.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: runbuilds Clean up runbuilds
Michael Wood [Wed, 6 Apr 2016 16:46:41 +0000 (17:46 +0100)] 
toaster: runbuilds Clean up runbuilds

- Organise the imports into logical groups
- Fix 80 col wrapping
- Remove catch all exceptions
- Log to the toaster log
- Use QuerySet functions such as .first() and Q()

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: runbuilds Make runbuilds aware of the build CANCELLED state
Michael Wood [Wed, 6 Apr 2016 16:46:40 +0000 (17:46 +0100)] 
toaster: runbuilds Make runbuilds aware of the build CANCELLED state

Add handlers to make sure we remove the BuildEnvironment LOCK when we
have cancelled a build.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: models Exclude the CANCELLED builds from get_number_of_builds
Michael Wood [Wed, 6 Apr 2016 16:46:39 +0000 (17:46 +0100)] 
toaster: models Exclude the CANCELLED builds from get_number_of_builds

Don't count CANCELLED builds when returning the number of builds.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: mrb_section template Add build cancel button
Michael Wood [Wed, 6 Apr 2016 16:46:38 +0000 (17:46 +0100)] 
toaster: mrb_section template Add build cancel button

Add the cancel build button to the mrb section template and add the event
handlers to cancelABuild.
Also clean up the calls to startABuild to use the updated libtoaster methods
and to make the code consistent with it's cancelABuild counterpart.

Co-Author: Sujith H <sujith.h@gmail.com>

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tables BuildsTable exclude cancelled builds
Sujith H [Wed, 6 Apr 2016 16:46:37 +0000 (17:46 +0100)] 
toaster: tables BuildsTable exclude cancelled builds

Exclude cancelled builds from showing in the builds table

[YOCTO #6787]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuildinfohelper: Add handler for cancelling a build
Michael Wood [Wed, 6 Apr 2016 16:46:36 +0000 (17:46 +0100)] 
buildinfohelper: Add handler for cancelling a build

When a build is cancelled the build (action) is complete if it has been
caused the request being cancelled then update the build outcome
accordingly.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: bldcontrol models Add a cancelling state the BuildRequest
Michael Wood [Wed, 6 Apr 2016 16:46:35 +0000 (17:46 +0100)] 
toaster: bldcontrol models Add a cancelling state the BuildRequest

To accurately reflect the state of a build request we also need a
cancelling state. This is set when we've started a build and then for
whatever reason cancel it, cancelling is not instantaneous so we have
this state to indicate that a cancel is in progress.

Also add a state transition guard. As the state of a BuildRequest can
currently be modified by three processes; Toastergui,
Runbuilds/bldcontrol and the buildinofhelper we cannot say for sure
which process will be running at the time of cancellation so in order to
avoid one of these processes making an incorrect transition only allow
transitions of state to increase.

e.g. CREATED -> QUEUED -> INPROGRESS
And to ignore such requested changes such as
INPROGRESS -> CREATED

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: models Add cancelled state to build outcome
Sujith H [Wed, 6 Apr 2016 16:46:34 +0000 (17:46 +0100)] 
toaster: models Add cancelled state to build outcome

A new state CANCELLED is introduced to, distinguish
the state of build.

[YOCTO #6787]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: update BuildEnvironmentController and BitbakeController
Sujith H [Wed, 6 Apr 2016 16:46:33 +0000 (17:46 +0100)] 
toaster: update BuildEnvironmentController and BitbakeController

Remove getBBController function from BuildEnvironmentController.
The constructor of BitbakeController is updated appropriately so that
call can be made to connect to running server.
The call to startBBServer is removed from bbcontroller and  handledin
localhostbecontroller.

[YOCTO #6787]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: libtoaster Update implementation of startABuild and cancelABuild
Michael Wood [Wed, 6 Apr 2016 16:46:32 +0000 (17:46 +0100)] 
toaster: libtoaster Update implementation of startABuild and cancelABuild

Update the implementation of startABuild and cancelAbuild to reflect
changes to the backend api. We now have a dedicated endpoint to make
calls into so add this url to libtoaster.ctx and allow passing null in
as a url value to indicate that we want to use the current project

Also:
 - Fix some documentation comments
 - Add the convenience of passing in an array of targets to startABuild

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: xhr Update the implementation of the build cancellation request
Michael Wood [Wed, 6 Apr 2016 16:46:31 +0000 (17:46 +0100)] 
toaster: xhr Update the implementation of the build cancellation request

Update the implementation of the backend api for cancelling builds with
the new cancelling BuildRequest state and cancelled Build state.
Also added some docstring about general usage.

Co-Author: Sujith H <sujith.h@gmail.com>

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Move xhr calls for starting and stopping builds
Michael Wood [Wed, 6 Apr 2016 16:46:30 +0000 (17:46 +0100)] 
toaster: Move xhr calls for starting and stopping builds

Move the backend xhr implementation of the build request changes
into it's own file and out of the ToasterTable definition.
It used to live in the views.py but in a hope of starting to collate logical
groups of views move this to a new file called api.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: bldcontrol Add forceShutDown function to BitbakeController
Sujith H [Wed, 6 Apr 2016 16:46:29 +0000 (17:46 +0100)] 
toaster: bldcontrol Add forceShutDown function to BitbakeController

Add forceShutDown function to BitbakeController class. This function
provides a mechanism to cancel the build from toaster. An API which
can be used safely to cancel build and hence shutdown running bitbake
server.

[YOCTO #6787]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoasterui: shutdown on BuildCompleted event
Ed Bartosh [Wed, 6 Apr 2016 16:46:28 +0000 (17:46 +0100)] 
toasterui: shutdown on BuildCompleted event

toasterui exits event loop on one of the following events:
CommandCompleted, CommandFailed or CommandExit.
Unfortunately none of them come from bitbake when build fails.
This is normai if toasterui runs in observer mode. However, if it's
in build mode this causes toasterui to stuck in the infinite loop
waiting for new events.

The only event we can rely on is BuildCompleted as it always
comes from bitbake unlike 3 above mentioned events.

Modified the code to always shutdown toasterui in build mode
on BuildCompleted event.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use bash explicitly
Ed Bartosh [Wed, 6 Apr 2016 16:46:27 +0000 (17:46 +0100)] 
toaster: use bash explicitly

Toaster can't run builds on Ubuntu as default /bin/sh points
to dash there. The reason is that oe-init-build-env can't
be sourced under dash for various reasons. It can be fixed
or work arounded, but it wouldn't fix builds for older releases.
Explicitly using bash to start builds should fix the issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix jethro build
Ed Bartosh [Wed, 6 Apr 2016 16:46:26 +0000 (17:46 +0100)] 
toaster: fix jethro build

The keys 'started', 'ended', 'cpu_time_user', 'disk_io_read' and
'disk_io_write' were added to the event recently, so they don't
exist in the events generated by bitbake server from older releases.

Checking if task_to_update structure has these keys before using
them should fix build of older releases.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: update conf/local.conf
Ed Bartosh [Wed, 6 Apr 2016 16:46:25 +0000 (17:46 +0100)] 
toaster: update conf/local.conf

Added 'INHERIT+="toaster buildhistory"' line to the conf/local conf
when Toaster starts. It should make commandline builds to provide
all required information to Toaster backend.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: stop bitbake server after the build
Ed Bartosh [Wed, 6 Apr 2016 16:46:24 +0000 (17:46 +0100)] 
toaster: stop bitbake server after the build

Bitbake server is used only during the build. There is no need
in keeping server running after the build.

Running bitbake -m in the subshell after the build should stop
the server.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add new parameter to _shellcmd
Ed Bartosh [Wed, 6 Apr 2016 16:46:23 +0000 (17:46 +0100)] 
toaster: add new parameter to _shellcmd

Added 'nowait' parameter to _shellcmd method to support
running chain of commands in a subshell.

This is going to be used to stop bitbake server after
the build.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: reimplement triggerBuild
Ed Bartosh [Wed, 6 Apr 2016 16:46:22 +0000 (17:46 +0100)] 
toaster: reimplement triggerBuild

Reimplemented triggerBuild method to support one build directory
per project:
 - start bitbake server from the cloned repository
 - don't run observer
 - run bitbake build directly instead of triggering it
   through xmlrpc

[YOCTO #7880]
[YOCTO #9058]
[YOCTO #8958]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: modified setLayers API
Ed Bartosh [Wed, 6 Apr 2016 16:46:21 +0000 (17:46 +0100)] 
toaster: modified setLayers API

Removed updating of bblayers.conf. It will be done in runBuild method.
Changed return value: return list of layers.
Removed _updateBBLayers method.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add brbe parameter to triggerBuild
Ed Bartosh [Wed, 6 Apr 2016 16:46:20 +0000 (17:46 +0100)] 
toaster: add brbe parameter to triggerBuild

Called triggerBuild with brbe parameter instead of adding TOASTER_BRBE
variable to the database and fetching it in triggerBuild.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove release API
Ed Bartosh [Wed, 6 Apr 2016 16:46:19 +0000 (17:46 +0100)] 
toaster: remove release API

This API is quite dangerous as it removes build directory.
It's not used anywhere and most probably will not be used in future
as toaster is going to have one build directory per project.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove startBBServer API
Ed Bartosh [Wed, 6 Apr 2016 16:46:18 +0000 (17:46 +0100)] 
toaster: remove startBBServer API

We still will have to run bitbake server, but it will be done
different way and the code will be in triggerBuild function.

Removed startBBServer API from BuildEnvironmentController and
LocalhostBEController classes.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoasterui: fix brbe reporting
Ed Bartosh [Wed, 6 Apr 2016 16:46:17 +0000 (17:46 +0100)] 
toasterui: fix brbe reporting

buildinfohelper.brbe is lost when buildinfohelper is closed.
This causes incorrect report of brbe when build is done.

Saved brbe attribute before closing buildinfohelper and used
it to report correct brbe.

Got rid of useless and confusing 'ToasterUI build done 1'
log message.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuildinfohelper: improve handling of providermap
Ed Bartosh [Wed, 6 Apr 2016 16:46:16 +0000 (17:46 +0100)] 
buildinfohelper: improve handling of providermap

DepTreeGenerated event doesn't contain 'providermap' data in jethro.
Modified buildinfohelper to handle events without this data. This
should make it possible to handle jethro events coming from jethro
bitbake server by the latest buildinfohelper.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agouievent: improve BBUIEventQueue code
Ed Bartosh [Wed, 6 Apr 2016 16:46:15 +0000 (17:46 +0100)] 
uievent: improve BBUIEventQueue code

Return value of self.BBServer.registerEventHandler differs between
jethro and master. To be able to build jethro toaster should be
able to communicate with jethro bitbake server i.e. it must work
with both old and new registerEventHandler call.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoasterui: add brbe parameter to buildinfohelper
Ed Bartosh [Wed, 6 Apr 2016 16:46:14 +0000 (17:46 +0100)] 
toasterui: add brbe parameter to buildinfohelper

In current toaster code BRBE(build request:build environment) value
is passed from toaster to buildinfohelper through the 'SetBRBE' event.

Passing it through environment variable is easier as it doesn't
involve rpc communication between toaster and bitbake server.
It also eliminates the need in running bitbake observer process.

Added parameter 'brbe' to BuildInfoHelper.__init__
Used environment variable TOASTER_BRBE to set brbe for
buildinfohelper object.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: set BITBAKE_UI environment variable
Ed Bartosh [Wed, 6 Apr 2016 16:46:13 +0000 (17:46 +0100)] 
toaster: set BITBAKE_UI environment variable

Set BITBAKE_UI variable to 'toastergui' for command line builds
to use toasterui as a default ui module for bitbake.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get rid of noui option
Ed Bartosh [Wed, 6 Apr 2016 16:46:12 +0000 (17:46 +0100)] 
toaster: get rid of noui option

noui command line option doesn't makes sense anymore as toaster doesn't
run bitbake. It should be safe to to remove it.

The purpose of this option was to skip running bitbake observer process.
This was never used before as it's not possible to run toaster build
without running observer.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: don't start bitbake server
Ed Bartosh [Wed, 6 Apr 2016 16:46:11 +0000 (17:46 +0100)] 
toaster: don't start bitbake server

>From now on toaster script will not run bitbake server.
It will be started by runbuilds and stopped after the build.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/git.py: remove .indirectiondir workaround
Robert Yang [Tue, 5 Apr 2016 10:35:51 +0000 (03:35 -0700)] 
fetch2/git.py: remove .indirectiondir workaround

It was used for workaround git 1.7.9.2 which was released in 2012 which
should not be existed on nowadays host, so remove it to avoid
confusions.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopersist_data: Return str instead of unicode for sqlite3 text queries
Klauer, Daniel [Tue, 5 Apr 2016 08:49:15 +0000 (08:49 +0000)] 
persist_data: Return str instead of unicode for sqlite3 text queries

Python 2's sqlite3 module defaults to returning Unicode strings for SQL
text queries, which could trickle down to other parts of bitbake code and
cause unexpected Unicode conversions. Using byte strings avoids this issue.

For example, the git fetcher's AUTOREV support caches HEAD SHA1's using
bb.persist_data, so sometimes the git command strings passed to fetch2's
runfetchcmd() were unicode, potentially causing UnicodeDecodeErrors when
it appended the values of environment variables containing non-ASCII chars.

[YOCTO #9382]

Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Ensure tainted stamps are accounted for with writing custom stamps
Richard Purdie [Sun, 3 Apr 2016 14:48:30 +0000 (15:48 +0100)] 
siggen: Ensure tainted stamps are accounted for with writing custom stamps

sstate.bbclass for example writes siginfo files to a separate location
but we need to read taint data from the standard path.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Fix nostamp taint handling
Richard Purdie [Sat, 2 Apr 2016 22:15:06 +0000 (23:15 +0100)] 
siggen: Fix nostamp taint handling

The taint values need to be passed from the server to the workers to
ensure they see the same stamp values. Also ensure that the "nostamp:"
prefix isn't included in the checksum value to match the server
calculation. This ensures the checksums are all consistent.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Add checksum recalculation/checking code
Richard Purdie [Sat, 2 Apr 2016 16:11:26 +0000 (17:11 +0100)] 
siggen: Add checksum recalculation/checking code

In theory all the information to recalcuate the task signatures was written
into the siginfo/sigdata files. In reality, some of the information was
written into the filename.

Firstly this patch duplicates that info into the file itself just for easy
of use since its small.

Secondly, we abstract out the existing "calculate the checksum" code for
the taskhash, and add a function to calculate the bashhash based on the
informaiton within the file.

Finally, we call these functions when we're writing out the data to check
that the data we're writing is consistent. I've found a couple of places
it wasn't and its good to know about these in advance, rather than having
a siginfo/sigdata file which a given hash in its filename but a contents
which give a different result.

This should all combine to avoid a certain class of checksum bugs making
it into world, and identifying problems in advance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Fix check calculation problem with file_checksums
Richard Purdie [Sat, 2 Apr 2016 16:10:48 +0000 (17:10 +0100)] 
siggen: Fix check calculation problem with file_checksums

When I enabled debugging of the checksum code, I found the value calculated
from siginfo/sigdata files for do_fetch tasks never matched. This was due
to an error in the way the data was being stored for these, it wasn't ordered
correctly. This patch fixes things so the checksums calculated from
siginfo/sigdata files is correct when file checksums are present.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Drop misleading duplicate method
Richard Purdie [Sat, 2 Apr 2016 16:08:57 +0000 (17:08 +0100)] 
siggen: Drop misleading duplicate method

The real method is a few lines later, this one is incorrect and
just causing confusion. Remove it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotests/fetch.py: Improve unit tests for trusted network check
Olof Johansson [Fri, 1 Apr 2016 15:01:48 +0000 (17:01 +0200)] 
tests/fetch.py: Improve unit tests for trusted network check

The tests were skipped when running without network even though they
didn't require network. This commit also adds a test case for URLs with
ports in them (the ports should not be considered when doing trusted
network checks).

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: BB_ALLOWED_NETWORKS should not care about port numbers
Olof Johansson [Fri, 1 Apr 2016 15:01:47 +0000 (17:01 +0200)] 
fetch2: BB_ALLOWED_NETWORKS should not care about port numbers

Bitbake would fail to classify the following URL as belonging to a
allowed network, because of the port number in the url.

 BB_ALLOWED_NETWORKS = "*.example.com"
 SRC_URI = "http://git.example.com:8080/foo.tar.gz"

Since protocols aren't specified in the BB_ALLOWED_NETWORKS variable,
it's reasonable to believe that this should work regardless of protocol
being used.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm better detect requires during CustomImageRecipe generation
Joshua Lock [Fri, 1 Apr 2016 11:57:58 +0000 (12:57 +0100)] 
toaster: orm better detect requires during CustomImageRecipe generation

We were doing a string search for the literal string "require" and
assuming that a match meant the recipe uses the require keyword to
include the contents of another recipe. This test isn't very smart (it
should at least have matched on "require ") and triggers on the word
require anywhere in the recipe, i.e. the word "required" in the
DESCRIPTION of core-image-lsb.bb, and then breaks as the much smarter
regex fails to match anything.

Instead always run the regex search and only try to update the
require entry when the regex matches.

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Correct typo on build form help text
Belen Barros Pena [Fri, 1 Apr 2016 11:55:40 +0000 (12:55 +0100)] 
toaster: Correct typo on build form help text

The help text said to append a semicolon and a task name to a target to
run a task other than do_build. What you need to append is a colon.

[YOCTO #9326]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper Add additional metadata to the built layer
Michael Wood [Fri, 1 Apr 2016 11:53:55 +0000 (12:53 +0100)] 
toaster: buildinfohelper Add additional metadata to the built layer

Add additional metadata to the layer created for build history to be
able to identify the layer and recipe later on. Specifically this is the
branch and release to which the recipe and layer are associated with
enabling differentiation of two recipes which are local release and
master and 'master' release.

[YOCTO #8528]
[YOCTO #8545]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Migrate landing page tests to Selenium
Elliot Smith [Thu, 31 Mar 2016 18:55:47 +0000 (19:55 +0100)] 
toaster: tests Migrate landing page tests to Selenium

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Migrate all projects page tests to Selenium
Elliot Smith [Thu, 31 Mar 2016 18:55:46 +0000 (19:55 +0100)] 
toaster: tests Migrate all projects page tests to Selenium

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Migrate project builds page tests to Selenium
Elliot Smith [Thu, 31 Mar 2016 18:55:45 +0000 (19:55 +0100)] 
toaster: tests Migrate project builds page tests to Selenium

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Migrate all builds page and project page tests to Selenium
Elliot Smith [Thu, 31 Mar 2016 18:55:44 +0000 (19:55 +0100)] 
toaster: tests Migrate all builds page and project page tests to Selenium

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests Migrate to Selenium for UI tests
Elliot Smith [Thu, 31 Mar 2016 18:55:43 +0000 (19:55 +0100)] 
toaster: tests Migrate to Selenium for UI tests

Create a new folder for Selenium tests.

Add a new base Selenium testcase class and a helper which
instantiates a webdriver for a given browser.

Add a sample Selenium test case which can be used as a template
for creating new tests.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Don't limit traceback lengths to arbitrary values
Richard Purdie [Thu, 31 Mar 2016 11:47:13 +0000 (12:47 +0100)] 
bitbake: Don't limit traceback lengths to arbitrary values

There appears to have been a lot of copy and pasting of the code
which prints tracebacks upon failure and limits the stack trace to
5 entries. This obscures the real error and is very confusing to the user
it look me an age to work out why some tracebacks weren't useful.

This patch removes the limit, making tracebacks much more useful for
debugging.

[YOCTO #9230]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata.py: remove slash in the end
Robert Yang [Wed, 30 Mar 2016 09:32:55 +0000 (02:32 -0700)] 
cookerdata.py: remove slash in the end

It's very possible that we added layer as:
BBLAYERS += "/path/to/meta/"

then there would be warning:
WARNING: No bb files matched BBFILE_PATTERN_core '^/path/to/meta//'

This patch can fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoBump version to 1.29.1
Richard Purdie [Wed, 30 Mar 2016 20:22:55 +0000 (21:22 +0100)] 
Bump version to 1.29.1

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuild/utils: Allow python functions to execute with real exception handling
Richard Purdie [Wed, 30 Mar 2016 19:52:56 +0000 (20:52 +0100)] 
build/utils: Allow python functions to execute with real exception handling

With the code as it stands today it not possible to execute a python function
and get "normal" python exception handling behaviour. If a python function
raises an exception, it forces a traceback to be printed and the exception
becomes a FuncFailed exception.

This adds in a parameter 'pythonexception' which allows standard python
exceptions to be passed unchanged with no traceback. Ultimately we may want
to change to this convention in various places but at least it means we can
start to add sane functions now.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: Ensure that incorrect checksumed files are always renamed
Richard Purdie [Wed, 30 Mar 2016 19:49:59 +0000 (20:49 +0100)] 
fetch2: Ensure that incorrect checksumed files are always renamed

There are some codepaths where the file checksum is verified and can
be found to mismatch but the 'rename' logic doesn't kick in. If code
relies on the presence of a file for the checksum having been checked
(e.g. uninative.bbclass) then it can be used when the checksum hasn't
matched.

Therefore rename the file whenever an invalid checksum is encountered.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: fix CookerParser.shutdown()
Markus Lehtonen [Wed, 30 Mar 2016 12:54:00 +0000 (15:54 +0300)] 
cooker: fix CookerParser.shutdown()

Prevent a hang when shutdown() is called during parsing (e.g. after
SIGINT). We must not append 'None' to the jobs queue. Otherwise the
worker loop inside Parser.realrun() may break out at the wrong point,
causing the results queue thread blocking bitbake indefinitely.

[YOCTO #9319]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: Ensure bbappend order is deterministic
Richard Purdie [Tue, 29 Mar 2016 15:09:52 +0000 (16:09 +0100)] 
cooker: Ensure bbappend order is deterministic

Currently bbappend files in a layer are applied in the order they're
found on disk (as reported by glob) which means things are not
deterministic.

By sorting the glob results, the order becomes deterministic, the parsing
order for .bb files also should be deterministic as a result of this change.

[YOCTO #9138]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agochecksum: In FileChecksumCache don't follow directory symlinks
Markus Lehtonen [Tue, 29 Mar 2016 13:04:19 +0000 (16:04 +0300)] 
checksum: In FileChecksumCache don't follow directory symlinks

Before this patch, directory symlinks mathcing filename pattern (either
a file name or a glob pattern) were followed. However, directory
symlinks deeper in the search chain were omitted by os.walk(). Now
directory traversal behaves consistently, ignoring syminks on all
levels.

One reason for choosing not to "walk into" directory symlinks is that
dir symlinks in externalsrc.bbclass in oe-core are causing problems in
source tree checksumming.

[YOCTO #8853]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata: Improve handling of ParseError
Richard Purdie [Mon, 28 Mar 2016 17:04:10 +0000 (18:04 +0100)] 
cookerdata: Improve handling of ParseError

If local.conf contains an invalid line, e.g.:

 APPEND += " igor"

(note the leading space) then nasty tracebacks are shown which confuse the
user. Change so the parse error is simply shown without a traceback, improving
the user experience.

[YOCTO #9332]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/wget.py: _check_latest_version_by_dir fix prefix detection
Aníbal Limón [Thu, 24 Mar 2016 18:08:19 +0000 (12:08 -0600)] 
fetch2/wget.py: _check_latest_version_by_dir fix prefix detection

When prefix is part of the version directory it need to ensure that
only version directory is used so remove previous directories if exists.

Example: pfx = '/dir1/dir2/v' and version = '2.5' the expected result
is 'v2.5' instead of '/dir1/dir2/v2.5'.

[YOCTO #8778]

Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/wget.py: _check_latest_version_by_dir use group names
Aníbal Limón [Thu, 24 Mar 2016 18:08:18 +0000 (12:08 -0600)] 
fetch2/wget.py: _check_latest_version_by_dir use group names

Little improvement for reference tokens by names instead of index.

Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: Handle lockfiles for file:// urls redirected to mirrors
Richard Purdie [Thu, 24 Mar 2016 16:11:56 +0000 (16:11 +0000)] 
fetch2: Handle lockfiles for file:// urls redirected to mirrors

We recently dropped lockfiles for file:// urls which in itself makes
sense.

If a file url redirects to something like an http:// mirror, we'd have
no lock taken for the original file and could race against others
trying to download the file. We therefore need to ensure there is a
lock taken in the mirror handling code.

This adds code to take such a lock, assuming it isn't the same lock
as the parent url.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get all dependents for pkg for removal
Dave Lerner [Thu, 24 Mar 2016 12:12:11 +0000 (12:12 +0000)] 
toaster: get all dependents for pkg for removal

For customised image package removal change behavior.
From:
    Only display the immediate dependents of the requested package
    to remove, not the full dependent list, that is dependents of
    dependents ...
    Do not remove the displayed dependents, just notify the user
    of the list.
To:
    Display the complete dependent tree, traversing all reverse
    dependencies starting from the package to be removed and then it's
    dependents.
    Change the modal dialog to note that all of these dependents will
    be removed automatically.

[YOCTO #9121]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: new customise package-remove modal dlg
Dave Lerner [Thu, 24 Mar 2016 12:12:10 +0000 (12:12 +0000)] 
toaster: new customise package-remove modal dlg

For customised image package removal, show a different modal dialog that
lists ALL of the packages dependent on this package, with a Remove All
button - implying that all of the dependents will be removed.

[YOCTO #9121]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: show full list of dependents to remove
Dave Lerner [Thu, 24 Mar 2016 12:12:09 +0000 (12:12 +0000)] 
toaster: show full list of dependents to remove

When a package is to be removed, show the full list of packages that are
dependent on that package, telling user that these packages will also be
removed.

[YOCTO #9121]

Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: fetch2/gitsm: Fix fetch when the repository contains nested submodules
Derek Straka [Thu, 24 Mar 2016 12:08:35 +0000 (08:08 -0400)] 
bitbake: fetch2/gitsm: Fix fetch when the repository contains nested submodules

This fixes a problem when the repository contains multiple levels of submodules via a resursive submodule init.

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: xmlrpc: set single use mode differently
Ed Bartosh [Thu, 17 Mar 2016 11:34:23 +0000 (11:34 +0000)] 
bitbake: xmlrpc: set single use mode differently

Currently xmlrpc server implicitly sets itself into single use mode
when bitbake server is started with anonymous port (0) or no port is
provided in command line. In this mode bitbake shuts down xmlrpc server
after build is done. This assumption is incorrect in some cases.
For example Toaster uses bitbake in this mode and expects xmlrpc server
to stay in memory.

Till recent changes single use mode was always unset due to the bug.
When the bug was fixed it broke toaster builds as Toaster couldn't
communicate with bitbake server in single use mode.

Reimplemented logic of setting single use mode. The mode is explicity
set when --server-only command line parameter is not provided to bitbake.
It doesn't depend on the port number anymore.

[YOCTO #9275]
[YOCTO #9240]
[YOCTO #9252]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: include/require checks current directory
Scott Rifenbark [Wed, 23 Mar 2016 21:47:42 +0000 (14:47 -0700)] 
bitbake-user-manual: include/require checks current directory

I added wording to note that include/require checks the current
directory in addition to BBPATH

Fixes [YOCTO #8566]

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Updated the "inherit Directive" section.
Scott Rifenbark [Tue, 22 Mar 2016 20:35:28 +0000 (13:35 -0700)] 
bitbake-user-manual: Updated the "inherit Directive" section.

Fixes [YOCTO #9283]

Updated the description to document conditional inherits.  Provided
several examples.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Updated the copyright year to 2016
Scott Rifenbark [Tue, 22 Mar 2016 20:35:00 +0000 (13:35 -0700)] 
bitbake-user-manual: Updated the copyright year to 2016

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agotoasterui: remove ParseStarted from the event list
Ed Bartosh [Thu, 17 Mar 2016 11:59:02 +0000 (11:59 +0000)] 
toasterui: remove ParseStarted from the event list

bb.event.ParseStarted event is not processed by toasterui, but
present in event list. This causes the following error:
   WARNING: Unknown event: <bb.event.ParseStarted object at ...
and non-zero return code:
   WARNING: Return value is 1

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoasterui: Remove the excessive exception logging
Michael Wood [Thu, 17 Mar 2016 11:49:16 +0000 (11:49 +0000)] 
toasterui: Remove the excessive exception logging

Remove the very verbose log dump from toasterui. This generates several
megabytes of not that useful debug information and actually hinders
finding the original exception.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocache: Make BB_DONT_CACHE variable external
Markus Lehtonen [Tue, 22 Mar 2016 14:59:55 +0000 (16:59 +0200)] 
cache: Make BB_DONT_CACHE variable external

This makes it possible to prevent a recipe to be cached, and thus,
parsed every time.

Use with care.

[YOCTO #8853]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm generate CustomImageRecipe contents try secondary path
Michael Wood [Wed, 23 Mar 2016 08:28:40 +0000 (08:28 +0000)] 
toaster: orm generate CustomImageRecipe contents try secondary path

Try a secondary file path if the first does not exist. When we get the
recipe paths and layer information from the layer index it is not a
complete path but we are usually able to reconstruct it. If the complete
real path has been discovered by building then use this instead.

[YOCTO #9206]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: localhostbecontroller put generated layer in the builddir
Michael Wood [Wed, 23 Mar 2016 08:28:39 +0000 (08:28 +0000)] 
toaster: localhostbecontroller put generated layer in the builddir

Move the generated layer for custom recipes into the build directory.
The build directory makes more sense as this layer/recipe is generated
for a particular build/project.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: localhostbecontroller Allow file:/// uri type for git repo
Michael Wood [Wed, 23 Mar 2016 08:28:38 +0000 (08:28 +0000)] 
toaster: localhostbecontroller Allow file:/// uri type for git repo

We don't need to skip file:/// uri type locations for git repositories.
If you're using a file:/// uri you should know that it has to be a local
path.

[YOCTO #9200]

igned-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm Add a constant for the CustomImageRecipe's layer name
Michael Wood [Wed, 23 Mar 2016 08:28:37 +0000 (08:28 +0000)] 
toaster: orm Add a constant for the CustomImageRecipe's layer name

Use a constant to define the name for the toaster custom images layer;
this constant is then used to identify this layer in various places.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: localhostbecontroller Don't clear out toaster custom layer dir
Michael Wood [Wed, 23 Mar 2016 08:28:36 +0000 (08:28 +0000)] 
toaster: localhostbecontroller Don't clear out toaster custom layer dir

We may have a recipe which is based on a custom image recipe that has
already been built so keep the recipe file around so that it can be read
by the generate recipe function.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb/tests/fetch: Update cups url
Richard Purdie [Mon, 21 Mar 2016 12:41:47 +0000 (12:41 +0000)] 
bb/tests/fetch: Update cups url

Update the upstream url used for testing cups versions after upstream website
changes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: fix ud.registry so that alternative registries can be handled
Brendan Le Foll [Fri, 11 Mar 2016 10:32:58 +0000 (10:32 +0000)] 
fetch2/npm: fix ud.registry so that alternative registries can be handled

Fixes [YOCTO #9231]

npm when given an invalid registry URL with --registry actually goes and
fetches from the default registry, but this commit makes sure it goes to the
specified one.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoserver/process: Try connecting 4 times before giving up
Lucas Dutra Nunes [Tue, 1 Mar 2016 13:13:34 +0000 (10:13 -0300)] 
server/process: Try connecting 4 times before giving up

Instead of trying one time with a timeout of 20 seconds try 4 times with
a timeout of 5 seconds, to account for a slow server start.

Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: models List only have the specified project's imported layers
Michael Wood [Wed, 9 Mar 2016 13:01:24 +0000 (13:01 +0000)] 
toaster: models List only have the specified project's imported layers

When returning the compatible layers make sure that we are only
listing: All the layers which are for this release && configuration
layers (i.e. aren't part of the build history) and which aren't an
imported layer OR are this project's imported layer(s).

[YOCTO #8944]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: rework task buildstats storage and display
Elliot Smith [Tue, 8 Mar 2016 11:32:12 +0000 (11:32 +0000)] 
toaster: rework task buildstats storage and display

The data available from buildstats is now more fine grained than
previously, so take advantage of that to enrich the data we save
against tasks:

* Store the CPU usage for user and system separately, and display
them separately.
* Disk IO is now measured in bytes, not ms. Also store the
read/write bytes separately.
* Store started and ended times, as well as elapsed_time. This
will enable future features such as showing which tasks were
running at a particular point in the build.

There was also a problem with how we were looking up the Task
object, which meant that the buildstats were being added to
new tasks which weren't correctly associated with the build. Fix
how we look up the Task (only looking for tasks which match the
build, and the task and recipe names in the build stats data) so
the build stats are associated with the correct task.

[YOCTO #8842]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use force_bytes to display non-ascii project names
Sujith H [Tue, 8 Mar 2016 18:09:02 +0000 (18:09 +0000)] 
toaster: use force_bytes to display non-ascii project names

When user enters a non-ascii character in the project
name of toaster, the build doesn't get triggered.
Use force_bytes to fix this.

Also deal with non-ascii project names when logging the
build request in runbuilds.

[YOCTO #9071]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their values
Peter Kjellerstedt [Tue, 8 Mar 2016 23:53:58 +0000 (00:53 +0100)] 
fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their values

For some reason, the values for SRC_URI[md5sum] and SRC_URI[sha256sum]
were not being expanded. That lead to the following code not working
as expected:

SRC_URI = "http://.../${PN}-${PV}.tar.gz"

MD5SUM = "123abc..."
SHA256SUM = "abcd1234..."

SRC_URI[md5sum] = "${MD5SUM}"
SRC_URI[sha256sum] = "${SHA256SUM}"

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoxmlrpc: fix bug in setting XMLRPCServer.single_use
Ed Bartosh [Wed, 9 Mar 2016 08:07:40 +0000 (10:07 +0200)] 
xmlrpc: fix bug in setting XMLRPCServer.single_use

XMLRPCServer.single_use attribute was always set to False.
This caused xmlrpc server to keep running after build is done as
BitBakeServerCommands.removeClient only shuts down server if its
single_use attribute is set to True.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: add missing URL argument to ParameterError
Paul Eggleton [Wed, 9 Mar 2016 04:22:14 +0000 (17:22 +1300)] 
fetch2/npm: add missing URL argument to ParameterError

Without this you get a rather odd traceback instead of the proper
exception message.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>