]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
9 years agobitbake-user-manual: Fleshed out the "addtask" documentation
Scott Rifenbark [Mon, 10 Oct 2016 19:39:59 +0000 (12:39 -0700)] 
bitbake-user-manual: Fleshed out the "addtask" documentation

Fixes [YOCTO #10401]

The "addtask" documentation was rewritten to tighten up the
introductory section and to flesh out the actual examples.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Updated the datastore functions
Scott Rifenbark [Mon, 10 Oct 2016 18:48:03 +0000 (11:48 -0700)] 
bitbake-user-manual: Updated the datastore functions

Fixes [YOCTO #10400]

No information existed for cases when a variable did not exist.
I added this information to each of the variables in the table.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agorunqueue.py: Remove redundant whitelist checks
Randy Witt [Tue, 11 Oct 2016 22:36:19 +0000 (15:36 -0700)] 
runqueue.py: Remove redundant whitelist checks

The whitelist checks for BB_SETSCENE_ENFORCE were running for every call
to execute(). Since the task list doesn't change for each call into
execute, the checks only need to be ran once.

[YOCTO #10369]

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Update version to 1.32.0
Richard Purdie [Tue, 11 Oct 2016 07:46:35 +0000 (08:46 +0100)] 
bitbake: Update version to 1.32.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodepexp: Close UI with error message on NoProvider event
Jussi Kukkonen [Mon, 10 Oct 2016 08:30:04 +0000 (11:30 +0300)] 
depexp: Close UI with error message on NoProvider event

Without this the UI just sits there doing nothing. Showing an
infobar in-UI would be nicer but not much more useful since currently
user couldn't do anything in-UI to fix the situation. Implementation
is based on the one in knotty.

Fixes [YOCTO #9288]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomain: Check bitbake server-only port is a number
Benjamin Esquivel [Fri, 7 Oct 2016 21:46:26 +0000 (16:46 -0500)] 
main: Check bitbake server-only port is a number

Either using the memres script or the bitbake call with --server-only
if the port is a string instead of a number then the process hangs
indefinitely causing a loop that never ends.

Add a check at the beginning for the port being a number otherwise
show an error message and exit cleanly.

[YOCTO #10397]

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Optimise task id string manipulations
Richard Purdie [Fri, 7 Oct 2016 07:26:48 +0000 (08:26 +0100)] 
runqueue: Optimise task id string manipulations

Some task id manipulations were suboptimal:

* taskfn_fromtid and fn_from_tid were effectively the same function
* many calls to split_tid(), then taskfn_fromtid()
* taskfn_fromtid() called split_tid() internally

This patch adds split_tid_mcfn() to replace split_tid() and returns the
"taskfn" variant being used in many places. We update all core calls
to the new function and ignore the return values we don't need since the
function call overhead of the split_tid wrapper is higher than ignoring
a return value.

The one remaining standalone use of taskfn_fromtid is replaced with
fn_from_tid. I couldn't see any external usage so it was dropped.

There is external usage of split_tid so a wrapper remains for it.

Combined together these changes should improve some of the runqueue task
manipulation performance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix cloning of git+ssh repositories
Ed Bartosh [Fri, 7 Oct 2016 06:23:20 +0000 (09:23 +0300)] 
toaster: fix cloning of git+ssh repositories

Replaced '+' -> '_' to avoid having '+' in folder name.

Thanks Stephan Dünner for this fix.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.runqueue: fix unexpected process death logic
Christopher Larson [Fri, 7 Oct 2016 04:07:41 +0000 (21:07 -0700)] 
bb.runqueue: fix unexpected process death logic

`if w in self.rq.worker` when w *is* self.rq.worker doesn't make a great deal
of sense, and results in this error:

      File ".../poky/bitbake/lib/bb/runqueue.py", line 2372, in runQueuePipe.read():
                             name = None
        >                    if w in self.rq.worker:
                                 name = "Worker"
    TypeError: unhashable type: 'dict'

Most likely this was meant to be 'is' rather than 'in', but rather than
checking after the fact, just include the name in the iteration, instead.

While we're here, also clean up and fix the broken error message.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoui/knotty.py: Fix signal handling of SIGWINCH in BBProgress
Aníbal Limón [Thu, 6 Oct 2016 21:52:07 +0000 (16:52 -0500)] 
ui/knotty.py: Fix signal handling of SIGWINCH in BBProgress

Add the ability to pass default signal handler for SIGWINCH in BBProgress
because with multiple instace of BBProgress the original signal handler
set by TerminalFilter (sigwinch_handle) is lost.

This is a fix for stack trace due to multiple async calls of ProgressBar
_handle_resize (ioctl to terminal fd), see:

NOTE: Executing SetScene Tasks
Fatal Python error: Cannot recover from stack overflow.

Current thread 0x00007f70a4793700 (most recent call first):
  File
"/home/alimonb/repos/poky/bitbake/lib/progressbar/progressbar.py", line
183 in _handle_resize
  File "/home/alimonb/repos/poky/bitbake/lib/bb/ui/knotty.py", line 58
in _handle_resize
  File "/home/alimonb/repos/poky/bitbake/lib/bb/ui/knotty.py", line 60
in _handle_resize
...
  File "/home/alimonb/repos/poky/bitbake/lib/bb/ui/knotty.py", line 60
in _handle_resize
...
Aborted

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Update tests to reflect front end changes
Michael Wood [Thu, 6 Oct 2016 00:08:54 +0000 (17:08 -0700)] 
toaster: Update tests to reflect front end changes

 - Browser test we changed the project heading access to use the class name
 - Update toastergui unit test for additional gotoUrl property
 - On faster browsers we had a race for layer details inputs being
   visible

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Delete notification update front end implementation to design
Michael Wood [Thu, 6 Oct 2016 00:08:53 +0000 (17:08 -0700)] 
toaster: Delete notification update front end implementation to design

Update the delete notifications to reflect feedback from design
review comments.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: importlayer Fix layer dependencies button state toggle
Michael Wood [Thu, 6 Oct 2016 00:08:52 +0000 (17:08 -0700)] 
toaster: importlayer Fix layer dependencies button state toggle

Fix regression introduced by switching typeahead library. Make sure we
enable and disable the add button based on whether the selection event
has fired or not.

[YOCTO #9936]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: checksettings Remove confusing startup messages
Michael Wood [Thu, 6 Oct 2016 00:08:51 +0000 (17:08 -0700)] 
toaster: checksettings Remove confusing startup messages

These "validation" messages are shown regardless as to whether the
settings are being correctly set or not.
For the time being remove them.

[YOCTO #9097]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper: Use correct way to get message from LogMessage
Michael Wood [Thu, 6 Oct 2016 00:08:50 +0000 (17:08 -0700)] 
toaster: buildinfohelper: Use correct way to get message from LogMessage

Use the correct method to get a message value from the LogMessage object
rather than constructing it ourselves which is not recommended. This
causes an exception when the msg contains a '%' such as when there are
wildcards in file names (something2.%.bbappends)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: api / project Cancel any in progress builds before project delete
Michael Wood [Thu, 6 Oct 2016 00:08:49 +0000 (17:08 -0700)] 
toaster: api / project Cancel any in progress builds before project delete

Before we finally delete any project make sure we send the cancel command to
any in-progress builds. This ensures that an inaccessible build doesn't block
up the system and that we don't get errors after deletion.

[YOCTO #10289]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Added new section on BB-style functions
Scott Rifenbark [Tue, 4 Oct 2016 16:58:44 +0000 (09:58 -0700)] 
bitbake-user-manual: Added new section on BB-style functions

Fixes [YOCTO #10364]

Added a new section titled "Bitbake-Style Python Functions
Versus Python Functions".  This section describes differences
for the user between the two types of functions.

Also, cleaned up a consistency problem with the terms
"BitBake style" and "BitBake-style".  I used the latter
throughout the manual.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Updated minor wordings.
Scott Rifenbark [Thu, 22 Sep 2016 23:27:41 +0000 (16:27 -0700)] 
bitbake-user-manual: Updated minor wordings.

Fixes [YOCTO #10296]

Applied some minor wording changes per review edits.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Added examples for using overrides with functions.
Scott Rifenbark [Wed, 21 Sep 2016 22:30:14 +0000 (15:30 -0700)] 
bitbake-user-manual: Added examples for using overrides with functions.

Fixes [YOCTO #10296]

This adds some bits clarifying you can append and prepend to
functions.  Added a bit to the introduction paragraph of the
"Appending and Prepending (Override Style Syntax)" section to
note that you can do this.  Referenced some new examples.

In the "Shell Functions" section I added an example.  In the
"BitBake Style Python Functions" section I also added an example.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Fixed grammar from missing word
Scott Rifenbark [Thu, 22 Sep 2016 23:07:13 +0000 (16:07 -0700)] 
bitbake-user-manual: Fixed grammar from missing word

Fixes [YOCTO #10293]

I omitted the work "quote" and needed to have it there.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add Font Awesome license
bavery [Mon, 3 Oct 2016 23:56:26 +0000 (16:56 -0700)] 
toaster: add Font Awesome license

Font Awesome fonts are bundled with the Toaster UI and are released
under the SIL Open Font License 1.1.  This patch adds that information
to the LICENSE file.

Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.build: in _exec_task, catch errors from TaskStarted
Christopher Larson [Tue, 4 Oct 2016 16:11:23 +0000 (09:11 -0700)] 
bb.build: in _exec_task, catch errors from TaskStarted

We don't always want a traceback when an exception is raised by the
TaskStarted event handler. Silently return if we get a SystemExit or
HandledException, and print the error and return for FuncFailed.

This is done via a separate try/catch block, to avoid firing TaskFailed if all
the TaskStarted event handlers didn't complete, otherwise the bitbake UIs get
unhappy.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoevent: prevent unclosed file warning in print_ui_queue
Joshua Lock [Tue, 4 Oct 2016 10:03:55 +0000 (11:03 +0100)] 
event: prevent unclosed file warning in print_ui_queue

Use logger.addHandler(), rather than assigning an array of Handlers
to the loggers handlers property directly, to avoid a warning from
Python 3 about unclosed files:

$ bitbake
Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.
WARNING: /home/joshuagl/Projects/poky/bitbake/lib/bb/event.py:143: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/joshuagl/Projects/poky/build/tmp/log/cooker/qemux86/20161004094928.log' mode='a' encoding='UTF-8'>
  logger.handlers = [stdout]

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Update version to 1.31.2
Richard Purdie [Wed, 5 Oct 2016 09:08:59 +0000 (10:08 +0100)] 
bitbake: Update version to 1.31.2

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb/event.py: fire_ui_handlers enable threading lock support
Aníbal Limón [Tue, 4 Oct 2016 21:15:56 +0000 (16:15 -0500)] 
bb/event.py: fire_ui_handlers enable threading lock support

In some cases there is a need to fire bb events into multiple
python threads so locking is needed (writing to a fd/socket).

Adding a helper functions for disable/enable by request to avoid
overhead.

[YOCTO #10330]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodata: Fix handling of vardepvalueexclude
Richard Purdie [Fri, 30 Sep 2016 16:22:12 +0000 (17:22 +0100)] 
data: Fix handling of vardepvalueexclude

The value used for exclusion was always being expanded. This is actually
a bad idea since in most cases you'd want to exclude an unexpanded
value and makes it impossible to use the variable as intended.

This adjusts things so the value is not expanded and we can correctly
remove things from checksums much more easily.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: make error message more informative
Ed Bartosh [Tue, 27 Sep 2016 15:16:56 +0000 (16:16 +0100)] 
toaster: make error message more informative

Error message
 ERROR: Unprocessed MetadataEvent <bb.event.MetadataEvent object at 0x7f750e671a58>
doesn't give a lot of information about the event. It just prints
event object, which is always bb.event.MetadataEvent.

Including event type into the error message should make it more
informative:
 ERROR: Unprocessed MetadataEvent TaskArtifacts

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 'Unhandled MetadataEvent' error
Ed Bartosh [Tue, 27 Sep 2016 15:16:55 +0000 (16:16 +0100)] 
toaster: fix 'Unhandled MetadataEvent' error

New MetadataEvent 'TaskArtifacts' causes this error.
Processing of this event will hopefully be implemented in future.
For now it should be enough to just skip it.

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 handling of EnvironmentError
Ed Bartosh [Tue, 27 Sep 2016 15:16:54 +0000 (16:16 +0100)] 
toaster: fix handling of EnvironmentError

Due to the bug in processing EnvironmentError exception,
toasterui ignores it. As EnvironmentError is a base for OSError
and IOError this means that all OSError and IOError exceptions
were silently ignored.

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: check if file exist
Ed Bartosh [Tue, 27 Sep 2016 15:16:53 +0000 (16:16 +0100)] 
toaster: check if file exist

Buildinfohelper assumes that all files mentioned in
manifest exist in deploy/ directory, which is not always
the case. Toaster crashes with OSError trying to
call os.stat on non-existing file.

Checking if file exists before processing it should
fix this.

[YOCTO #10185]

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 modifying OEROOT in toaster script
Ed Bartosh [Tue, 27 Sep 2016 15:16:52 +0000 (16:16 +0100)] 
toaster: stop modifying OEROOT in toaster script

Setting OEROOT in toaster script makes oe-init-build-env to
break with error:
  bash: ../bitbake/bin/../../scripts/oe-buildenv-internal: No such file or directory
This happens because OEROOT contains path relative to build
directory.

Renamed OEROOT to OE_ROOT and unset it after it's used.

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: layerdetails Update implementation of delete imported layer
Michael Wood [Mon, 26 Sep 2016 10:59:37 +0000 (13:59 +0300)] 
toaster: layerdetails Update implementation of delete imported layer

Update the implementation of delete an imported layer so that it is
consistent with the other delete messages and wording. Also use the new
libtoaster way of setting a notification that the delete was successful.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: customrecipe Add frontend feature to delete custom image recipe
Michael Wood [Mon, 26 Sep 2016 10:59:36 +0000 (13:59 +0300)] 
toaster: customrecipe Add frontend feature to delete custom image recipe

[YOCTO #8132]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: importlayer Convert success import to new notification system
Michael Wood [Mon, 26 Sep 2016 10:59:35 +0000 (13:59 +0300)] 
toaster: importlayer Convert success import to new notification system

Use the simpler libtoaster method of showing a notification about
successful import of a layer.
Also a number of whitespace clean ups.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add front end controls for deleting a build
Michael Wood [Mon, 26 Sep 2016 10:59:34 +0000 (13:59 +0300)] 
toaster: Add front end controls for deleting a build

Add front end modal and controls for deleting a build from the build
dashboard.

Also convert the Actions list to links instead of buttons as per the
design.

[YOCTO #6238]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add backend API for deleting a build
Michael Wood [Mon, 26 Sep 2016 10:59:33 +0000 (13:59 +0300)] 
toaster: Add backend API for deleting a build

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: alerts and modals Avoid modals and alerts overlaying each other
Michael Wood [Mon, 26 Sep 2016 10:59:32 +0000 (13:59 +0300)] 
toaster: alerts and modals Avoid modals and alerts overlaying each other

Make sure that when we spawn a modal we clear any notifications and also
make sure that old notifications are cleared before showing a new one.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: project page Implement front end feature to delete project
Michael Wood [Mon, 26 Sep 2016 10:59:31 +0000 (13:59 +0300)] 
toaster: project page Implement front end feature to delete project

Add confirm modal and api calls to delete a project from the project
dashboard.

[YOCTO #6238]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: libtoaster Add a global notification set/show mechanism
Michael Wood [Mon, 26 Sep 2016 10:59:30 +0000 (13:59 +0300)] 
toaster: libtoaster Add a global notification set/show mechanism

We now have a number of places where we show change notifications based
on an event in a previous page (imported a layer, deleted a build,
deleted a project etc) and we show these notifications on various pages
so we add a simple notification utility to libtoaster.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: move MostRecentBuildsView to its own widget
Michael Wood [Mon, 26 Sep 2016 10:59:29 +0000 (13:59 +0300)] 
toaster: move MostRecentBuildsView to its own widget

This view is specific to the builds dashboard rather than gernic api so
like ToasterTable and ToasterTypeAhead we class it as a widget as it has
a single purpose. Also clean up some flake8 identified issues.

Original author of the code moved in this commit is Elliot Smith.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Clean up and convert to rest api project edit and get calls
Michael Wood [Mon, 26 Sep 2016 10:59:28 +0000 (13:59 +0300)] 
toaster: Clean up and convert to rest api project edit and get calls

Convert the project xhr calls into proper rest api and port the client
side calls to use the new API. Fix all the pyflakes identified issues
and clean up unused fields.

Also remove the api and client side code for changing release on the fly
as this is no longer supported.

[YOCTO #9519]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Ensure worker failure is accounted for in task statistics
Richard Purdie [Wed, 28 Sep 2016 09:35:12 +0000 (10:35 +0100)] 
runqueue: Ensure worker failure is accounted for in task statistics

If the worker fails to launch, ensure the task is shown as failed rather
than a confusing "all succeeded" message.

Patch from Juro Bystricky

[YOCTO #10335]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuild.py: fix os.getcwd() exception
Juro Bystricky [Mon, 26 Sep 2016 20:53:13 +0000 (13:53 -0700)] 
build.py: fix os.getcwd() exception

When trying to obtain the current directory from a directory
that does not exist anymore, an exception is raised.
This patch handles such exception.

[YOCTO #10331]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoknotty: ensure progress bar output is accounted for in display
Paul Eggleton [Fri, 23 Sep 2016 09:14:32 +0000 (21:14 +1200)] 
knotty: ensure progress bar output is accounted for in display

When calculating how many lines we'd printed we weren't properly taking
the progress bars into account, with the result that sometimes if the
last line printed on the terminal wrapped to the next line (which is
possible) we backed up less lines than we should have.

Additionally, we should always print a newline after updating the
progress bar - there's no need to check if there wasn't output (there
always will be courtesy of our overridden _need_update()) and we now
allow the line to wrap so we don't need to check the other condition
either.

Hopefully this will fix [YOCTO #10046].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoknotty: Show task elapsed time
Richard Purdie [Thu, 22 Sep 2016 12:54:43 +0000 (13:54 +0100)] 
knotty: Show task elapsed time

Its often useful to know how long a task has been running for. This patch
adds that information to the task display, updating every 5s if there
were no other updates so the user can see how long tasks have been running
for.

[YOCTO #9737]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker/providers: Only add target to world build if task exists
Richard Purdie [Wed, 21 Sep 2016 21:31:57 +0000 (22:31 +0100)] 
cooker/providers: Only add target to world build if task exists

A "bitbake world -c unpack" currently breaks as not all tasks have an
unpack task. This change allows addition of world targets only if the
specified task exists which makes certain commands possible when otherwise
you just get errors which can't easily be avoided.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: handle absolute paths in subdir
Ross Burton [Wed, 21 Sep 2016 16:31:27 +0000 (17:31 +0100)] 
fetch2: handle absolute paths in subdir

Currently if you use the subdir parameter in a SRC_URI and pass an absolute path
then it gets appended to the unpack directory instead of being used directly.
This is inconvenient as it may be useful to use ${S} when you want to unpack a
file into the source tree.

Change this behaviour so that absolute paths are used directly instead of being
appended to the root directory.  To ensure that recipes cannot write files to an
arbitrary location enforce that the subdir starts with the unpack root.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Added information for using single quotes
Scott Rifenbark [Wed, 21 Sep 2016 21:03:10 +0000 (14:03 -0700)] 
bitbake-user-manual: Added information for using single quotes

Fixes [YOCTO #10293]

In the section about setting variables, I added a paragraph that
explains the use of single quotes when setting a variable.  The
case covers when you must have the double quote charater as part
of your variable's value.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: New section on functions you can call from Python
Scott Rifenbark [Wed, 7 Sep 2016 14:52:26 +0000 (07:52 -0700)] 
bitbake-user-manual: New section on functions you can call from Python

Fixes [YOCTO #10100]

I added a new parent directory named "Functions You Can Call From
Within Python".  This section contains a couple new sub-sections.
One is the existing "Functions for Accessing Datastore Variables".
The other is called "Other Functions", and it is used to point
or reference some commonly used functions that the user can call
from within Python.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.build: in _exec_task, catch BBHandledException
Christopher Larson [Fri, 16 Sep 2016 20:05:11 +0000 (13:05 -0700)] 
bb.build: in _exec_task, catch BBHandledException

We don't want a traceback for this exception, we need to catch it, fire
TaskFailed, and return failure.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Handle missing sstate dependencies better
Richard Purdie [Tue, 20 Sep 2016 15:25:49 +0000 (16:25 +0100)] 
runqueue: Handle missing sstate dependencies better

If you "bitbake glibc-locale" then delete the libpcre-native sstate
and "bitbake glibc-locale -C package_write_rpm", it will fail with
rpmbuild missing the libprce library.

The reason is that libpcre-native fails to install from sstate (since
it isn't present) but doesn't get built and hence rpm-native tries to
run without its dependencies.

The simplest fix is not to add "covered" tasks which have failed to
install sstate. I can't help feeling there is more to this issue but
this does fix the current problem and shouldn't have adverse affects.
It is an unusual situation to have missing dependencies in sstate since
they're usually all present or not at all.

I've taken the opportunity to remove some old cruft from when we had
numeric task ids, the code can be simpler now.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper local layer don't construct path using git info
Michael Wood [Tue, 20 Sep 2016 01:44:20 +0000 (18:44 -0700)] 
toaster: buildinfohelper local layer don't construct path using git info

When the layer is local source don't try and work out the location of
the layer by using the git information (getGitCloneDirectory)

[YOCTO #10199]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add tests to detect if we have missing db migrations
Michael Wood [Mon, 19 Sep 2016 02:37:53 +0000 (19:37 -0700)] 
toaster: Add tests to detect if we have missing db migrations

Based on the same test as found in patchwork by Damien Lespiau
https://github.com/dlespiau/patchwork/blob/master/patchwork/tests/test_db.py

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: unlock BuildEnvirnoment when build is done
Ed Bartosh [Fri, 16 Sep 2016 16:22:35 +0000 (17:22 +0100)] 
toaster: unlock BuildEnvirnoment when build is done

There is no need to lock build environment before changing
build status as this operation is very fast. However, there
is a need to unlock it after changing build status.

Explicitly unlocked BuildEnvironment after build reaches
final status SUCCEEDED, FAILED or CANCELLED. This should
allow runbuilds process to pickup next build faster.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunbuilds: code cleanup - remove unused imports
Ed Bartosh [Fri, 16 Sep 2016 16:22:34 +0000 (17:22 +0100)] 
runbuilds: code cleanup - remove unused imports

Fixed pylint warning:  W0611(unused-import): Unused import

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunbuilds: code cleanup - whitespaces, long lines
Ed Bartosh [Fri, 16 Sep 2016 16:22:33 +0000 (17:22 +0100)] 
runbuilds: code cleanup - whitespaces, long lines

Fixed following pylint warnings:
 C0330(bad-continuation): Wrong hanging indentation before block.
 C0326(bad-whitespace): No space allowed around keyword argument assignment
 C0326(bad-whitespace): Exactly one space required before assignment
 C0301(line-too-long): Line too long

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunbuilds: process builds on start
Ed Bartosh [Fri, 16 Sep 2016 16:22:32 +0000 (17:22 +0100)] 
runbuilds: process builds on start

If Toaster is stopped incorrectly there could be some
build requests and builds in incorrect state left from the previous run.
Running main processing function on start should take care of those.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunbuilds: process builds on SIGUSR1
Ed Bartosh [Fri, 16 Sep 2016 16:22:31 +0000 (17:22 +0100)] 
runbuilds: process builds on SIGUSR1

Run main processing function 'runbuild' only if SIGUSR1 is
received. This signal is sent by Toaster when build status
is changed (either started, cancelled or finished).

This should stop continuous database polling as run_builds function
will be called only when needed, i.e. after build status is changed.

[YOCTO #8918]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: notify runbuilds when build status changes
Ed Bartosh [Fri, 16 Sep 2016 16:22:30 +0000 (17:22 +0100)] 
toaster: notify runbuilds when build status changes

Called signal_runbuilds API when build is scheduled, cancelled or
finished to notify runbuilds process about builds status change.

[YOCTO #8918]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: implement signal_runbuilds function
Ed Bartosh [Fri, 16 Sep 2016 16:22:29 +0000 (17:22 +0100)] 
toaster: implement signal_runbuilds function

This function reads pid of runbuilds process from
BUILDDIR/.runbuilds.pid and sends SIGUSR1 to it. signal_runbuilds
function will be used in Toaster code to notify runbuilds when
build is scheduled, finished or cancelled.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix checking of repository url
Ed Bartosh [Fri, 16 Sep 2016 16:22:28 +0000 (17:22 +0100)] 
toaster: fix checking of repository url

Toaster checks gir repository url is the same as locally cloned before
checking it out to existing local clone. This check can be skipped if
commit is 'HEAD' as in this case repository is not hard reset to
commit, so the local clone won't be changed.

[YOCTO #10163]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata.py: Catch BBHandledException, preventing a backtrace in an event
Mark Hatle [Thu, 15 Sep 2016 20:57:21 +0000 (15:57 -0500)] 
cookerdata.py: Catch BBHandledException, preventing a backtrace in an event

The event handling 'Exception' was catching and triggering a backtrace.  This
trace was obscuring any errors from an event handler that had raised the
BBHandledException, which should indicate do not print additional information.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker.py: add LAYERRECOMMENDS processing
Joe Slater [Wed, 14 Sep 2016 17:29:52 +0000 (10:29 -0700)] 
cooker.py: add LAYERRECOMMENDS processing

Add recommended layers to collection_depends[] so that dynamic
priority assignment will work for both depends and recommends.

Recommended layers do not cause an error or warning
if they are not in the collection list, but debug messages
are output for level 3 and above.

explode_dep_versions2 returns a dictionary, so we
change the variable deplist to depDict.  The dictionary
values are lists which are either empty or contain only one
version specification.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Remove duplicate layer information
Belen Barros Pena [Mon, 19 Sep 2016 02:33:15 +0000 (19:33 -0700)] 
toaster: Remove duplicate layer information

In the custom recipe details page, the layer information is displayed
twice in the right hand column. Remove one of the layer entries, since
showing the layer information once should be enough.

[YOCTO #10037]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Indicate active navigation element
Belen Barros Pena [Mon, 19 Sep 2016 02:33:14 +0000 (19:33 -0700)] 
toaster: Indicate active navigation element

The left navigation in the build history pages is not showing the active
item when you navigate directly to the errors or warnings information in
the build summary. Add a special case to make sure the "build summary"
item is highlighted.

[YOCTO #9864]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix links to tasks with specific outcome
Belen Barros Pena [Mon, 19 Sep 2016 02:33:13 +0000 (19:33 -0700)] 
toaster: Fix links to tasks with specific outcome

The build dashboard provides a count of tasks that were executed and not
executed, and of tasks that failed (if any). The number is a link to the
list of tasks.

Fix the links so that they filter the tasks table by the selected
criteria (executed, not executed or failed).

[YOCTO #9832]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agouihelper: use elif instead of repeated if
Ross Burton [Fri, 16 Sep 2016 11:32:27 +0000 (12:32 +0100)] 
uihelper: use elif instead of repeated if

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: check if target contains task
Ed Bartosh [Thu, 15 Sep 2016 08:26:28 +0000 (11:26 +0300)] 
cooker: check if target contains task

Task name was incorrectly added to the targets that already
contained :task suffix and fired with BuildInit event. This
caused Toaster to create incorrect Target objects and show
them in UI.

[YOCTO #10221]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata: allow multiple passes of config re-parsing
Markus Lehtonen [Thu, 15 Sep 2016 11:20:50 +0000 (14:20 +0300)] 
cookerdata: allow multiple passes of config re-parsing

[YOCTO #10188]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata: fire ConfigParsed event after re-parse
Markus Lehtonen [Thu, 15 Sep 2016 11:20:49 +0000 (14:20 +0300)] 
cookerdata: fire ConfigParsed event after re-parse

[YOCTO #10188]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoAdd missing file from 'toaster: Allow git information to be null for BRLayer'
Richard Purdie [Fri, 16 Sep 2016 13:35:57 +0000 (14:35 +0100)] 
Add missing file from 'toaster: Allow git information to be null for BRLayer'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobuild: Allow dirs/cleandirs to work for empty functions
Richard Purdie [Wed, 14 Sep 2016 21:29:43 +0000 (22:29 +0100)] 
build: Allow dirs/cleandirs to work for empty functions

Users are surprised when dirs/cleandirs aren't acted upon for
empty functions. This reorders the code slightly so that those
flags are acted upon for empty functions as there are cases where
this is expected.

[YOCTO #10256]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: fetch2: Make SRCREV_FORMAT name substitution safer
Ulf Magnusson [Mon, 12 Sep 2016 22:40:37 +0000 (00:40 +0200)] 
bitbake: fetch2: Make SRCREV_FORMAT name substitution safer

The implementation of SRCREV_FORMAT has at least two issues:

 1. Given two names "foo" and "foobar" and SRCREV_FORMAT = "foo_foobar",
    "foo" might currently get substituted twice, and "foobar" not at
    all.

 2. If the revision substitued for some name happens to contain another
    name as a substring, then that substring might incorrectly get
    replaced.

Fix both issues by sorting the names with the longest ones first and
replacing all names at once with a regular expression. This was inspired
by
http://stackoverflow.com/questions/6116978/python-replace-multiple-strings.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: don't download same URL multiple times
Paul Eggleton [Tue, 13 Sep 2016 02:11:41 +0000 (14:11 +1200)] 
fetch2/npm: don't download same URL multiple times

If we've already fetched a particular URL then we do not need to do so
again within in the same operation. Maintain an internal list of fetched
URLs to avoid doing that.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoevent.py: output errors and warnings to stderr
Ed Bartosh [Thu, 8 Sep 2016 11:02:33 +0000 (14:02 +0300)] 
event.py: output errors and warnings to stderr

All logging messages are printed on stdout when processing
UI event queue. This makes it impossible to distinguish between
errors and normal bitbake output. Output to stderror or stdout
depending on log level should fix this.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: record events on cooker exit
Ed Bartosh [Mon, 5 Sep 2016 11:27:35 +0000 (14:27 +0300)] 
cooker: record events on cooker exit

Bitbake collects all events in special event queue when called with
-w option. However, it starts to write events to the eventlog only
after BuildStarted event is received. In some cases this event is
not received at all, e.g. when bitbake is run with --parse-only
command line option.

It makes sense to write all collected events when CookerExit event
received to make sure all events are written into the eventlog even
if BuildStarted event is not fired.

[YOCTO #10145]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: don't kill all runserver processes
Ed Bartosh [Mon, 5 Sep 2016 14:29:32 +0000 (15:29 +0100)] 
toaster: don't kill all runserver processes

Toaster script kills runserver process 2 ways:
 - sending signal to pid from .toastermain.pid.
 - sending signal to pids found by grepping ps output:
       ps fux | grep "python.*manage.py runserver"

Second approach is redundant and harmfull as it kills all django
development server running on the machine.

[YOCTO #7973]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove handling of .toasterui.pid
Ed Bartosh [Mon, 5 Sep 2016 14:29:31 +0000 (15:29 +0100)] 
toaster: remove handling of .toasterui.pid

This file is not created anywhere, but handled in toaster
script code.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: don't kill toaster on start
Ed Bartosh [Mon, 5 Sep 2016 14:29:30 +0000 (15:29 +0100)] 
toaster: don't kill toaster on start

There is no point of trying to kill django development server
when toaster starts because 'manage.py checksocket' command is already
used in the script code to check if development server port is occupied.

Even if Toaster is listening on another port, killing previous instance
looks quite implicit and doesn't solve anything as there are other
processes that might be still running.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm Update IMAGE_FSTYPES values
Belen Barros Pena [Mon, 5 Sep 2016 14:29:29 +0000 (15:29 +0100)] 
toaster: orm Update IMAGE_FSTYPES values

This patch fixes a typo in one of the IMAGE_FSTYPES values listed in
Toaster. It also updates the hardcoded list of values to match the
latest list in meta/classes/image_types.bbclass

[YOCTO #9447]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: keep layer name in variable history path
David Reyna [Mon, 5 Sep 2016 14:29:28 +0000 (15:29 +0100)] 
toaster: keep layer name in variable history path

When converting variable history file names to relative
paths, keep the layer directory's name so that the user
can distinguish between conf files with the same name.

[YOCTO #8188]

Signed-off-by: David Reyna <david.reyna@windriver.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Allow forward slash in variable names
Belen Barros Pena [Mon, 5 Sep 2016 14:29:27 +0000 (15:29 +0100)] 
toaster: Allow forward slash in variable names

Add forward slash to the list of special characters allowed in variable
names. Also update the list of allowed special characters in the error
messages.

[YOCTO #9611]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: layer details Fix "edit" form interaction
Belen Barros Pena [Mon, 5 Sep 2016 14:29:26 +0000 (15:29 +0100)] 
toaster: layer details Fix "edit" form interaction

Make sure the layer information disappears when the edit form shows, and
that the layer details come back when you click the 'cancel' button in
the edit form.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: import layer Layout fixes
Belen Barros Pena [Mon, 5 Sep 2016 14:29:25 +0000 (15:29 +0100)] 
toaster: import layer Layout fixes

The layout of the import layer form was looking a bit awkward. This
commit tidies things up a bit.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: layer details Layout fixes
Belen Barros Pena [Mon, 5 Sep 2016 14:29:24 +0000 (15:29 +0100)] 
toaster: layer details Layout fixes

The layout of the layer details page was looking a bit awkward. This
commit tidies things up.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: configuration Provide machine help text
Belen Barros Pena [Mon, 5 Sep 2016 14:29:23 +0000 (15:29 +0100)] 
toaster: configuration Provide machine help text

When you change the machine from the project configuration page, you get
some useful suggestions as you start typing a machine name. However, the
suggestions only include machines provided by the layers added to your
project. This is not necessarily clear from the design (yes, it should
be improved), which means you might be looking for a machine, not see it
in the suggestions, and assume the machine is not supported by
OpenEmbedded.

Since we are in no position to change the design of this page right now,
add some explanatory help text to address the situation.

[YOCTO #8034]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tasks Remove recipe version from defaults
Belen Barros Pena [Mon, 5 Sep 2016 14:29:22 +0000 (15:29 +0100)] 
toaster: tasks Remove recipe version from defaults

The 'Recipe version' column should not be part of the set of columns
shown by default in the tasks table. Set the hidden property for that
column to 'True' so that it doesn't show when you load that table
for the first time.

[YOCTO #10179]

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolib/bb/utils: edit_metadata() comment tweaks
Paul Eggleton [Mon, 5 Sep 2016 22:57:33 +0000 (10:57 +1200)] 
lib/bb/utils: edit_metadata() comment tweaks

No functional changes, just make a couple of minor tweaks to the
comments for edit_metadata():

* There are four elements to be returned by the callback function
* Add an example return statement for when you don't want to modify the
  value

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: clarify comment
Paul Eggleton [Mon, 5 Sep 2016 22:57:32 +0000 (10:57 +1200)] 
fetch2/npm: clarify comment

The correct name of the parameter is "version" not "ver" so ensure we
aren't misleading the user by giving the latter in an example.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: handle top-level shrinkwrap file
Paul Eggleton [Mon, 5 Sep 2016 22:57:31 +0000 (10:57 +1200)] 
fetch2/npm: handle top-level shrinkwrap file

Allow using a top-level shrinkwrap file with one or more npm://
dependencies, i.e. if the module isn't found at the top level then look
one level down.

Part of the fix for [YOCTO #9537].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: support subdir= parameter
Paul Eggleton [Mon, 5 Sep 2016 22:57:30 +0000 (10:57 +1200)] 
fetch2/npm: support subdir= parameter

"npmpkg" can be a default, but it should respect the subdir parameter as
with other FetchMethods. This allows us to have more than one npm://
entry in SRC_URI without nasty hacks.

Fix required in order to support [YOCTO #9537].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: fix broken fetches if more than one npm URL fetched
Paul Eggleton [Mon, 5 Sep 2016 22:57:29 +0000 (10:57 +1200)] 
fetch2/npm: fix broken fetches if more than one npm URL fetched

You cannot set a URL-specific value in an object-level variable on
the FetchMethod in urldata_init() or the result is the value specific to
the last URL will be the one that gets set. This prevented fetching more
than one npm:// URL correctly - the other tarballs would not download to
the correct location and do_unpack failed to find them as a result.

Fix required in order to support [YOCTO #9537].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/npm: explicitly specify workdir
Paul Eggleton [Mon, 5 Sep 2016 22:57:28 +0000 (10:57 +1200)] 
fetch2/npm: explicitly specify workdir

We were downloading into the current directory here, which is fine if
that current directory can be expected to be the right place - but
that's not true when called from recipetool within OE. We should
explicitly specify the directory to run the command in and then there
won't be a problem.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.fetch2.svn: correctly pass workdir when fetching
Christopher Larson [Wed, 31 Aug 2016 19:57:08 +0000 (12:57 -0700)] 
bb.fetch2.svn: correctly pass workdir when fetching

The ud.pkgdir argument was being passed as the 'quiet' argument to
runfetchcmd, not the 'workdir' argument, resulting in fetching the svn module
into the root of DL_DIR, not where it belongs.

Cc: Matt Madison <matt@madison.systems>
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker.py: Catch when stdout doesn't have a file descriptor
Mariano Lopez [Tue, 23 Aug 2016 07:06:11 +0000 (07:06 +0000)] 
cooker.py: Catch when stdout doesn't have a file descriptor

Currently, there is a check to remove the TOSTOP attribute from
a tty to avoid hangs. It assumes that sys.stdout will have a
file descriptor and this is not always true, some IO classes
will throw exceptions when trying to get its file descriptor.

This will add a check for such cases and avoid throwing an
exception.

[YOCTO #10162]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: localhostbecontroller Remove git assumption
Michael Wood [Mon, 22 Aug 2016 15:42:36 +0000 (16:42 +0100)] 
toaster: localhostbecontroller Remove git assumption

We don't need to force everyone to use git for the method in which
openembedded-core is downloaded. For instance it could have been
downloaded and extracted as a tarball.

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: Allow git information to be null for BRLayer
Michael Wood [Mon, 22 Aug 2016 15:42:35 +0000 (16:42 +0100)] 
toaster: Allow git information to be null for BRLayer

We no longer only deal with layers that have their source in a gir
repository, we also allow for local directories too so update the
BRLayer model to reflect this.

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 Add selenium test layer source switching layer details page
Michael Wood [Mon, 22 Aug 2016 15:42:34 +0000 (16:42 +0100)] 
toaster: tests Add selenium test layer source switching layer details page

Add selenium tests for the new layer source switching functionality on
the layer details page. Edits the values for git repository and saves
and then edits the details for directory information and saves.

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: Move Custom image recipe rest api to api file
Michael Wood [Mon, 22 Aug 2016 15:42:33 +0000 (16:42 +0100)] 
toaster: Move Custom image recipe rest api to api file

We now have a dedicated file for the rest API so move and rework for
class based views. Also clean up all flake8 identified warnings.

Remove unused imports from toastergui views.

The original work for this API was done by Elliot Smith, Ed Bartosh,
Michael Wood and Dave Lerner

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: Fix oe-core fixture
Michael Wood [Mon, 22 Aug 2016 15:42:32 +0000 (16:42 +0100)] 
toaster: Fix oe-core fixture

Due to a copy paste error we managed to get some of the wrong
information in the oe fixture that provides a suggested default settings
for Toaster. This meant it tested correctly when it shouldn't have.
Fix:
 - The use of local bitbake
 - An incorrect call to realpath which didn't include its parent module.
 - The field used for the local_dir of an existing openembedded-core

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>