Commit Graph

3537 Commits

Author SHA1 Message Date
Belen Barros Pena 1e0e700f4b bitbake: toasterui: style the Toaster version information
When debugging is turned on, we show some Toaster version
information in the top bar. Present it so that it can
be easily copied and pasted.

(Bitbake rev: 5de46fabe9ab1e525048353c2ecd8846ffefc760)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:44 +00:00
Michael Wood 4742ae94a9 bitbake: toaster: layerdetails Fix pagination controls
Bring the pagination controls into line with others in toaster by
limiting the number of page buttons to 5

[YOCTO #7195]

(Bitbake rev: 0b35eed7ca758476f20d6875291ee31fad35b7d3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:43 +00:00
Michael Wood 00e3545029 bitbake: toaster: layerdetails Add link to machines file
In the machines table for a layer add a link/icon to the machine
definition file.

[YOCTO #7241]

(Bitbake rev: 8c4e5fb580f5e375ccb1e84d8adb9562d1ba4b62)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:43 +00:00
Michael Wood e28097f8a2 bitbake: toaster: layerdetails summary/descriptions to be searchable
Allow the descriptions of the machine summary and layer description to
be searchable in their respective tables.

[YOCTO #7199]

(Bitbake rev: 1a1a61f587e05af76299c7e1d3b7ab079fb4b1c1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:43 +00:00
Belen Barros Pena bd5087dc77 bitbake: toastergui: fix spacing and input field sizes
The revision label was missing the projec-form class (which
controls the spacing in the form), and the revision text
field was a bit too long, so changed it from span4 to
span3.

(Bitbake rev: 219d57d1cec178820f679a4153324986c37821db)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:35:43 +00:00
Chong Lu dfa28485fc bitbake: bitbake-layers: add ability to fetch layers and their dependencies from layer index
Add a command to query layer dependencies from a layer index such as the
OpenEmbedded Layer Index at http://layers.openembedded.org. Fetches the
layer and its dependencies and adds them into conf/bblayers.conf.

[YOCTO #5348]

(Bitbake rev: 4b8fcf9a5bc802793bf332334217faace55f14f6)

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Paul Eggleton 90ffdc01ba bitbake: bitbake-layers: fix logging
Logging output was simply not getting printed.

(Bitbake rev: 62b825b19b13a914cbff5303d541bd5dbbec90a7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Paul Eggleton 4a32837971 bitbake: bitbake-layers: refactor to use argparse instead of cmd
This makes help formatting and option handling a lot more standardised
and allows us to drop a bunch of code. We also gain slightly more
straightforward error handling.

One side-effect however is that the old subcommand syntax using
underscores is no longer supported. The dashed form has been supported
(and displayed in the help text) for quite a while now so I wouldn't
imagine that will be much of an issue.

(Bitbake rev: 6e2f09b58882d3949026b9dd545f789ad3fe6fab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21 22:05:37 +00:00
Michael Wood 5db6a27f48 bitbake: toaster: importlayer Remove description input field
This wasn't required or working due to a typo and adds ambiguity between
the summary and description. The correct method for changing the description
or summary is via the layerdetails page.

[YOCTO #7190]

(Bitbake rev: 605298ff3ce919127003dadef95798472327f943)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:20 +00:00
Belen Barros Pena d27893dc74 bitbake: toasterui: remove layer directory in managed mode
Removes the layer directory information from the packages
built page when in managed mode.

[YOCTO #7221]

(Bitbake rev: 1eaf60d0fe34f5f43386c6f0e91f0b26c7a62845)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:20 +00:00
Belen Barros Pena 50f11b9d6d bitbake: toasterui: style the Toaster version information
In debug mode, we show the Toaster version and mode in the
top bar. Display them inside a tooltip that appears when
you hover over a nice info icon to make them less conspicuous.

(Bitbake rev: 8365f19191d0ec5901c79b7afd5005f7a546fe74)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Michael Wood 91e900f636 bitbake: toaster: layerdetails Don't show None type in description/summary
When the result for the summary or description is None don't output the
result as the string version of None, use an empty value so that the
"Not set" mechanism works.

[YOCTO #7244]

(Bitbake rev: 34397e585df0fc04ea53046347856e8cddb8f8e1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
David Reyna 64fc177299 bitbake: toaster: landing page when no build module
Add landing page for managed build pages when build module not installed.

Some wording and whitespace changed.

[YOCTO #6483]

(Bitbake rev: 6618a0a71cc9ea5426238549094ab9e05ae61649)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN c856a4efc9 bitbake: toaster: get proper version string
This patch brings in the toaster tree commit ID in
the version string to allow users properly report their
toaster version when submitting issues.

(Bitbake rev: 5cc87ee0ac3b2bd399e7f009dda9d6de87209a27)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN e133fbf301 bitbake: toasterui: UI query performance improvements
We reduce the number of queries by using "select_related"
to bring in more data in a single query. Improvements in
project page refresh, recipes table and tasks table.

(Bitbake rev: eefdae12120f879b555ba0a353277a18675eecbc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru Damian 9c358bd1d7 bitbake: toasterui: fix time estimation in project page
This patch fixes the time estimation to build completion
in project page. Additionally it fixes the Most Recent Builds
section used in various pages in managed mode, and proper
time to build estimation in all pages.

[YOCTO #7004]

(Bitbake rev: 5fecfda0e47c2ecba9b7c903c6d258eefa431aa0)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN 6dbd214fdf bitbake: toaster: properly detect starting in rolling log file
This patch brings in properly detection of system start in
a rolling toaster_ui log file.

(Bitbake rev: 6da36cbf5eeb30b8352c22aed3e0ede35705e13c)

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

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

[YOCTO #7220]
[YOCTO #7206]

(Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN 88f431cddf bitbake: toasterui: empty state for pages
Toaster needs to properly prompt the user and display
actionable help texts when the database is void of
meaningful information. This patch brings in the
"empty" states for pages.

[YOCTO #6755]

(Bitbake rev: 7cfe279bf77b59d5cbd20d8a93e1d33279bebc20)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:32 +00:00
Michael Wood 208f40dc05 bitbake: toaster: Set the machines page default pagesize to 100
This brings it into line with the all layers and targets pages

(Bitbake rev: 7c862ae4e3c3a00f2b37c2272007ce64304359bd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:32 +00:00
Michael Wood baa38a14c7 bitbake: toaster: Remove filtering from layers,machines and targets
The filter counts are unreliable so for consistency the filter feature
here is removed.

[YOCTO #7060]
[YOCTO #7052]

(Bitbake rev: ca5124d48d306921ac0f0499762ea5867644b0ef)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:32 +00:00
Michael Wood c5ba5eccba bitbake: toaster: Remove Layer source from machines, layers and targets
From the bug: The layer source reveals too much of the implementation model,
without explaining what is going on behind the scenes. It will confuse more
than inform, so let's get rid of it.

[YOCTO #7302]

(Bitbake rev: 7fee378849c9518a4560aa5be65fca9644c03048)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:32 +00:00
Michael Wood 82d2c502c2 bitbake: toaster: New build button allow arbitrary build targets
Target input field needed to support both selecting suggestions and
typing targets, since Toaster doesn't always know about all the targets
provided by the layers in the project.

[YOCTO #7187]

(Bitbake rev: d753db7a18eb9218016e586171d2a08298a0b05d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:32 +00:00
David Reyna 9819728e12 bitbake: toaster: Additional fixes for the project variable page
Fix IMAGE_FSTYPES, IMAGE_INSTALL_append, and DISTRO editing management, plus other usability details.

[YOCTO #7231]

(Bitbake rev: 58f19f1c3128c303fb8e5338c01f575418dc0b15)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:31 +00:00
Michael Wood eba4e0f74a bitbake: toaster: layerdetails use new vcs reference api
Use the new layer_version api so that we return the vcs reference whether
that be the commit hash, branch name or the upstream branch to which the
layer is associated with.

[YOCTO #7192]

(Bitbake rev: fa6e6d5b18c8c6231ae8ac499d332298f551fd7d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:31 +00:00
Alexandru DAMIAN 377526562d bitbake: toaster: fix git checkout command
This patch fixes the git checkout command that would fail to
properly rebase the working tree in some cases.

[YOCTO #7309]

(Bitbake rev: 25640851c8f8459741d2c423b2bb54f9f59a536a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:31 +00:00
Alexandru DAMIAN a07cf2e50c bitbake: toaster: properly detect failed server start
This patch brings in reading the server log if the server
fails to start. This is the first step in displaying the errors
in a manner that is actionable by the user.

[YOCTO #7285]

(Bitbake rev: 7f47b67bccff55673a827dbcccc767af4459c933)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:31 +00:00
Michael Wood d8d0db1701 bitbake: toaster: Use on input event for validation rather than keyup
Avoid using keyup event to trigger form validation as this won't fire
for events such as pasting or autofill from the browser.

[YOCTO #7292]

(Bitbake rev: 2060be8d31baa0cd302aa8dc0b6d179df853ee99)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17 14:38:31 +00:00
Aníbal Limón 6ae933b75c bitbake: tests/fetch.py: latest_versionstring add set of PN
Add set of PN in data because now latest_versionstring use it for
validate version directory searching.

(Bitbake rev: 2e4a03db967ac1459b2764108fc54c4566a7e371)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:06 +00:00
Aníbal Limón 1c1d9e3beb bitbake: fetch2: wget remove scape of - in regexes don't needed
(Bitbake rev: 8fa43245351f3ec0a5007b2742c08b7ef98e7879)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:06 +00:00
Aníbal Limón 5a88664b22 bitbake: fetch2: wget _modelate_version improvments
Fix sustition for rc, beta and alpha releses from -N to N weight.

(Bitbake rev: 63a9e60a6d80cfd2693ec1a6359785dc19f98e1f)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:06 +00:00
Aníbal Limón 22cebb87b7 bitbake: fetch2: wget latest_versionstring improvments in get version by dir
Add support for scan every version directory using _check_latest_version
makes code more robust because sometimes upstream projects publish
new directories without files, causing don't find version.

To support this new behaviour remove _check_latest_dir and replace for
_check_latest_version_by_dir,

(Bitbake rev: 1a75b3707743c32eec9d2cf566fb6bbea9f73784)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:06 +00:00
Aníbal Limón 62e171b721 bitbake: fetch2: wget add _check_latest_version_by_dir
Add _check_latest_version_by_dir this function provides support
for scan every directory newer than current dir in order to get
latest_versionstring, example:

	http://somedoamin.com/project/v2.1/
	http://somedoamin.com/project/v3.0/

Change return of _vercmp from True/False to -1/0/1 to provide test
when current directory is equal to newer directory this helps to
scan the same directory to get minor versions, example:

	http://somedoamin.com/project/v2.1/project-v2.1.2.tgz
	http://somedoamin.com/project/v2.1/project-v2.1.6.tgz

(Bitbake rev: 5f7c5eb218a221165f59a0f4dd48d2d97f756193)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:06 +00:00
Aníbal Limón 309d92efde bitbake: fetch2: wget latest_versionstring _check_latest_version improvments
In order to reduce code duplication now compile package_regex in
_init_regexes instead of make this decision at _check_latest_version,

(Bitbake rev: e7284e3ad0e7dd91ed59dfbf8450ef62e89c7e54)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:05 +00:00
Aníbal Limón bed1b3f47e bitbake: fetch2: wget latest_versionstring improve _parse_path
Add support for get group only if exist in regex, this enables to use
this function in _check_latestversion regardless if the regex is generic
or specified by REGEX_URI.

(Bitbake rev: 1127af5b8c458929c4685b0326f86870ed09442e)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:13:05 +00:00
Paul Eggleton c4da9b949a bitbake: cooker: rework LAYERDEPENDS versioning so that it is actually useful
We've had versioned dependency support in LAYERDEPENDS for quite a long
time, but I can say with pretty good certainty that almost nobody has
used it up to now because it was too strict - the specified version had
to exactly match the version in your configuration or you would get an
error; there was no "greater than or equal" option, which is usually
what you will want given that LAYERVERSION does get bumped from time to
time.

However, users mismatching layer branches and then having their builds
fail later on with some incomprehensible error is still a pretty common
problem. We can't simply use the git branch because not everyone is
always on a branch and the branch names don't always match up (and
that's not an issue). To provide a practical means to address branch
mismatching, I have reworked LAYERDEPENDS version specifications to use
the more familiar "dependency (>= version)" syntax as used with package
dependencies, support non-integer versions, and clarified the error
message a little. If we then take care to bump the version on every
breaking change, it is at least possible to have layers depend on these
changes when they update to match; we can now even support a major.minor
scheme to allow retrospectively adding a version limiter to old branches
when a new branch is created and yet still allow the old branch minor
version to be bumped if needed.

Fixes [YOCTO #5991].

(Bitbake rev: 408be9cdf2b1e32e64ea488d8051a546fb54c144)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:10:42 +00:00
Paul Eggleton 758dc92abd bitbake: tests: add tests for OE pre-release version formatting
This scheme is used for versioning recipes that are pre-release (alpha,
beta, etc.) within OpenEmbedded, so add some tests to ensure the
appropriate comparison results still hold true.

(Bitbake rev: 3a9eefe27f29a4593d6298f0427ac5f3e9183377)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:10:42 +00:00
Paul Eggleton 93c3f3922c bitbake: utils: ensure explode_dep_versions2 raises an exception on invalid/missing operator
We really want an error rather than the version to just be silently
skipped when the operator is missing (e.g. "somepackage (1.0)" was
specified instead of "somepackage (>= 1.0)".)

(Bitbake rev: b6dc946f477adc40d68da16e2f2580cb3b4a10db)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:10:42 +00:00
Maxin B. John b427750a5d bitbake: depexp.py: Fix segfault if DISPLAY is not set
bitbake -g -u depexp <package> segfaults when DISPLAY is not set
properly. Fix it with a proper check.

[YOCTO #7299]

(Bitbake rev: f35e9bd7b59c180fe9a3d9177efb57b92d9cd373)

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-16 09:09:43 +00:00
Scott Rifenbark 231d4a9d3d bitbake: bitbake-user-manual: Removed errant writer note line.
Removed a note to myself in the BB_ORIGENV example.

Reported-by: Paul Eggleton <paul.eggleton@intel.com>
(Bitbake rev: 27848725316ddae619c1b86f8adc0bfecfadf413)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:09:32 +00:00
Scott Rifenbark 9f562f8844 bitbake: bitbake-user-manual: Added some links to some new variables.
(Bitbake rev: 5b8249acabad3eeedcf564590e6ab71588aec89c)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:09:32 +00:00
Scott Rifenbark d87805b66d bitbake: bitbake-user-manual: Added five new repo variables and links.
Added the following variables to the glossary:

  CVSDIR
  GITDIR
  SVNDIR
  HGDIR
  BZRDIR

Several areas in the main manual mentioned these variables.  For
each, I added the appropriate link to the glossary term.

(Bitbake rev: 5b797c758bf0499646e4e0256f03fbbdfb3ea080)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:09:32 +00:00
Scott Rifenbark 961e692cf2 bitbake: Makefile: Updated the script to not create PDF version by default
For this release, we are dropping automatic creation of PDF manual.
The user can still create them by specifically using the 'pdf' target.

(Bitbake rev: e19320b4c453844f4ea7f7c1e56a9ed3e552f014)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:09:32 +00:00
Belen Barros Pena 1a740bbde1 bitbake: toastergui: links outside Toaster should open in a new window
Make sure all links going to pages outside Toaster in
the layer details page (to web repos and the like)
open in a new tab/window.

[YOCTO #7193]

(Bitbake rev: 5482507210c3bd1c6223fc1e7881ac5c5474fbdf)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:51 +00:00
Michael Wood c8a8288f49 bitbake: toaster: All machines Fix filter counts
Filter counts needed to take into account the filters that had
previously been applied.

(Bitbake rev: 97ef99ea5107543799ec2386b3840b435347edfb)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:51 +00:00
Michael Wood ea7d2461b4 bitbake: toaster: All machines show results count if filtering or searching
Show the number of results returned if filtering as well as when
searching.

(Bitbake rev: 44e989b32cc36efa31f893c40930bcc9f746bd43)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 2a3ca552ce bitbake: toaster: All machines reset order_by if removing that column
When you remove a column from a table that is currently being sorted by
that value we also need to remove the sort.

(Bitbake rev: fcb551ff622b3b24ee113ad49ec6cbd26569acd0)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 203ac2937c bitbake: toaster: all Machines exclude de-prioritised layer source items
If a duplicate layer exists from another layer source and provides a
machine we don't want to show it if that layer comes from a low priority
layer source.

(Bitbake rev: ae52f478bbf693b85da21f64835e70825968a305)

Signed-off-by: Michael Wood <michael.g.wood@intel.com
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood a7ab4d0314 bitbake: toaster: All Machines fix reset search link
In firefox this link wasn't valid as it was inside a button element.
Remove this and add a click handler for the button.

(Bitbake rev: 97366eae1d5c2c84b03b3e019480e56e03f812da)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 9e8798fd37 bitbake: toaster: models Allow the machine's layer name to be searched
Make the layer name searchable. If you know the name of the layer you are
interested in, searching for it is a fast way of getting the list of
machines provided by it.

(Bitbake rev: 0a2e0194fe7d949f1e9e01f7b42a7e0dc7a223f5)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood d6868d5d9d bitbake: toaster: All machines Add filtering based on layer in project
Add a filter so that we can filter machines which are already being provided
by a layer in the current project.
Also make sure that we're only showing layers which are compatible with
the current project.
Also handle no results returned and page heading reflecting the number of
results returned from a search.

AlexD solved conflicts while merging the patch.

(Bitbake rev: b0ae4d2bb71e897d8a846a3cf14b7151baa09bd2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 50719afbc2 bitbake: toaster: All machines Add layer name order by functions
Allow the layer name to be sorted alphabetically in the machines table.
Also fix the default ordering to be machine name

(Bitbake rev: 8fffd7b5fd53bd66ed7621595f57e2cae416e80d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 02b7704052 bitbake: toaster: layerdetails Don't remove alert from dom on dismissal
When dismissing the alert we actually want to keep the alert area still
in the dom for the use of future alerts. The default behaviour is to
remove it from the dom. Hide it again instead.

(Bitbake rev: b3af4f01856c1983f2e77293444e2c3c1b08f879)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood a1347a150a bitbake: toaster: All machines Update layer notifications
Update layer notifications to the new wording for layer add remove
notifications.
Fix bug where the the alert area is being removed from the dom on
dismiss instead of re-hidden

(Bitbake rev: 2a571a4523dbbe9b6afcf2e6b41edf2cb059729d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 479338cc7b bitbake: toaster: All machines add a column to link back to machine conf
Add a column with the "path" to the machine file and add a link back to
the vcs web to view the machine configuration file.

(Bitbake rev: c1462c0530fe6c34ffef87bcde7a363995b503c9)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 87074af8ce bitbake: toaster: machines Make sure we don't overwrite the pagesize
The pagesize was accidentally being over written and should be set to
the value returned from the cookie if there was one.

(Bitbake rev: 2c3b84f5012196c62be3ecf212e9752ee307635c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 8c25c3491b bitbake: toaster: Add add/select functionality to machines page
This feature for the machines page allows the user to add a layer and
it's dependencies to the current project and then if successful select
the machine(s) which become available due to being provided by the
layer.

AlexD merged the changes into the submission queue.

(Bitbake rev: ca4e4ab09ba214363181eeb8ad54ccc716bd65f3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 6969a3d3ea bitbake: toaster: machines Fix undefined variables
pagesize and orderby were undefined causing an error to be thrown when
browsing to the all machines page

(Bitbake rev: 388cfb26695ffd6ac0498e5de571cd4a5e083f8b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena b2a903e1ba bitbake: toastergui: add download task log icon to recipe details page
When a task fails, we keep the log and allow users to
download it. Make sure the download is provided in the
tasks table of the recipe details page.

[YOCTO #7207]

(Bitbake rev: 29837409a6cbabafe9e4d102e8143bab5ec22dc2)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena 6877263f36 bitbake: toastergui: add the word 'compatible' to 'all' pages
Labels for the 'all' pages don't really convey what's provided in them.
The team has suggested we add the word 'compatible' to them,
to make clear they will show all layers / targets / machines that
can be built with the version of the build system you are
using in a certain project. A link like 'view all targets'
becomes 'view all compatible targets'.

I've also added some help text.

(Bitbake rev: 49d85b7035d12a6e482d608e828f69fcafb59d39)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena 42a7d91ad4 bitbake: toastergui: set column heading to 'Revision'
Replace the column heading 'Branch, tag or commit' with
'Revision'. This also fixes 7023.

[YOCTO #7023]

(Bitbake rev: 102144f8e5069f76e7de8db052c3c4531609771f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN d81e5141c1 bitbake: toaster: display Toaster mode and version in debug mode
This patch displays the current running mode and checked-out git branch
as Toaster version when running in debug mode.

(Bitbake rev: 93e4f8c44273f4657c5be4c00b61db12aa875e31)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN da8110a86a bitbake: toaster: improve logging facilities for toaster
This patch improves the logging facilities for toaster in order
to help diagnose bugs that happen on user machines.

The logs are stored now under "/tmp/toaster_$$" where $$ is a
PID-based unique identifier. On shutdown, toaster will automatically
erase all logs unless errors are listed in the log file.

On error, Toaster provides suggestions on what to do.

This patch includes a minor fix found as a result of logging
improvements.

(Bitbake rev: 8a8248f7b7e30469f592e2f8adbf6ce21e8685c5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN 0c89846daf bitbake: toaster: enhancements for the startup sequence
This patch brings fixes and enhancements in the startup sequence.

- the dependency version checking is now correctly enforced when
starting in both modes
- fixed errors in looking up environment variables
- added message with 'daemon' program start location
- presenting menu for selecting config file

[YOCTO #7283]
[YOCTO #7291]
[YOCTO #7273]

(Bitbake rev: c5ddd9d88910857a1b745b1c237df0390dd56835)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN 202d808f89 bitbake: toastergui: improvements in layer selection logic
This patch clearers and bring fixes for the layer selection
logic in order to enable information collected during build to be used
in configuring projects, specifically targeting the recipes
learned through the building process.

The patch also adds tests to verify the layer selection logic.

[YOCTO #7189]

(Bitbake rev: f0faba8ef0f08c98ac4bddf5b3954d540820d215)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN b741c9a4b4 bitbake: toaster: enable server-side caches and debug-panel
This patch enables the server-side caches for Django using
file cache in /tmp/ directory.

Patch enables django debug panel if available.

(Bitbake rev: 00496fb67fa341477edbf80c5438f0b069871ac6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN d72f1982ee bitbake: toastergui: fix loadconf error message
Toaster crashes in loadconf if it needs to raise an Exception due
to poorly formatted error message. This patch fixes the formatting

[YOCTO #7276]

(Bitbake rev: 2a18952a525d15814389584817674f6c3aee12d6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena ed5c448e2b bitbake: toaster: correct typo in toaster script
A small typo slipped in the message included in
the fix for [YOCTO #6023].

(Bitbake rev: f28fb3d660d8726b75e6c31fa36bc22b54e1bca7)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena 514b7cf3bf bitbake: toasterui: use text() instead of html()
Use the text() jQuery function instead of the html()
one for security reasons.

(Bitbake rev: b96457870b40ba60dd5c86d83c43093d09b70aea)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena 16a9667b5c bitbake: toastergui: remove time link for failed build requests
Failed build requests do not have a build time page where
you can look at the time spent on each task. Therefore,
their build time information cannot be a link to such
a page.

(Bitbake rev: b7b1e64f650c9ea676714209b9d6e7efeca992be)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Ross Burton 825c0a9835 bitbake: data_smart: split expanded removal values when handling _remove
Given these assignments:

 TEST="a b c d"
 TEST_remove = "b d"

TEST evaluates to "a c".  However, if the _remove override is given as a
variable:

 TEST="a b c d"
 FOO = "b d"
 TEST_remove = "${FOO}

TEST evaluates to "a b c d", because when FOO is expanded it isn't split into a
list.

Solve this by splitting all members of removeactive once they've been expanded.

[ YOCTO #7272 ]

(Bitbake rev: 207013b6dde82f9654f9be996695c8335b95a288)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 12:21:36 +00:00
Ross Burton b00e781b4a bitbake: tests/data: add test for incorrect remove behaviour
The _remove operator isn't working correctly when used with a variable that
expands to several items, so add a test case to exercise this path.

(Bitbake rev: cb2a62a5fbffb358528a85b46c1fc6383286cb9d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 12:21:36 +00:00
Alexandru DAMIAN 2237c9fcaa bitbake: toaster: proper setup for build configuration
This patch makes sure that all the toaster conf files are actually
written from the build enviroment controllers.

Additionally, toaster checks that the 'daemon' program, which is used
to start the build system, is available (currently for localhost).

[YOCTO #7171]

(Bitbake rev: 0a1db7d1531f8254955e1152bcd8e6db4ec1d277)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-02 12:34:53 +00:00
Alexandru DAMIAN afe85485fe bitbake: toaster: new layer checkout logic
This patch implements a new layer checkout logic that brings more
flexibility in getting layers under different commits work with
Toaster.

The new hibrid logic will checkout separately each layer and commit id;
the task execution will be delegated to the checkedout bitbake, but the
data logger will be executed from the current toaster version as to
bring in enough data to sustain the updates in UI models.

[YOCTO #7171]
[YOCTO #6892]

(Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30 15:14:58 +00:00
Alexandru DAMIAN c58c94824b bitbake: toaster: update texts for the startup sequence
This patch updates the prompts to the user to better explain
what Toaster is doing and the information it needs from the user.

Additionally, fixes a check in loadconf command.

[YOCTO #6785]
[YOCTO #7251]

(Bitbake rev: 90ef8975f35e2da824bc1c80e41ca26d9af0b208)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30 15:14:58 +00:00
Richard Purdie 635130d0d1 bitbake: data_smart: Don't use mutable objects as default args
These only have one instance created which means your subsequent datastores
can contain echos of previous ones. Obviously this is not the behaviour
we want/expect. It doesn't affect bitbake too badly as we only have one
datastore, it does massively potentially break our selftests though.

Thanks to Tim Amsell for pointing out the now obvious problem!

(Bitbake rev: 9facf3604759b00e8fe99f929353d46f8b8ba5cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Pascal Bach 087424d925 bitbake: parse/ast: Fix issue if path contains '&'
(Bitbake rev: 4fea138f7cef53626a40decb96207dbaf9284020)

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Alexandru DAMIAN 4f7182775c bitbake: toastergui: update project build listing
We update the build listings in the project mode to enable
proper display and selection of build requests that do not have
an actual build object because the bitbake process did not start.

We add a page to display error details for build requests that
did not start a build.

Fixing errors and misspelling in build sections.

Sorting by "timespent" is disabled for build-listing pages.

[YOCTO #7165]
[YOCTO #7156]
[YOCTO #7196]
[YOCTO #7188]

(Bitbake rev: ee13bf45cecd6a0132d724b3206a6f4515669496)

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

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

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

[YOCTO #7213]

(Bitbake rev: b11e8bd626e0212ee72914529c3d92d1dd718674)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Belen Barros Pena 32b396b8e1 bitbake: toastergui: alignment fix
Align horizontally the pagination and show rows
controls at the bottom of the layer details page.

(Bitbake rev: 8be4a8cf1673112e9e613e719fa6ed96dbca8976)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Belen Barros Pena bc63d6bc7b bitbake: toastergui: remove recipe id links to the layer index
Toaster cannot use the recipe id to link to the layer
index, because recipe ids can change. We need to search
by the recipe name instead.

This patch removes the recipe id link from the layer
details page and replaces it with a search by the
recipe name.

It also makes sure links to the layer index open in
a new tab/window.

[YOCTO #7194]
[YOCTO #7193]

(Bitbake rev: 947ef663e452c15933218fd680875ade7cb46e9a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena a9c0865239 bitbake: toastergui: consistent capitals in button
Capitalise correctly the 'Build target' button label in
the layer details page: it should match the table heading.

(Bitbake rev: 4d52ceb7e66835a3088d83cd4caa002a3e7a1297)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 05f5435563 bitbake: toastergui: hide table controls when when less than 10 entries
The 'show rows' and pagination controls in the layer details
page should only show when there are more than 10 entries
in a table.

[YOCTO #7217]

(Bitbake rev: 5399738fb2e2956a7d4ce59699dc4b6f6c67bbb2)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 8a2ec99aad bitbake: toastergui: set column width in layer details page
Set the width of the action columns to span2 to stop
the buttons from wrapping as much as possible.

(Bitbake rev: 4282a92fe3652c52448dba3d5f3fc4e1de28be63)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena d4b9b0f416 bitbake: toastergui: add 'show all' link to no results page
When you search for targets or machines in the layer details
page and your search returns no results, you should
see a 'show all' link that you can click to clear the
search and display all table entries.

[YOCTO #7218]

(Bitbake rev: 70486fc36c5b6bd6b7b8e846e23ad4062d583877)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena c748c7e68a bitbake: toastergui: give the add dependencies form some breathing space
In the editable version of the layer details page, the form to
add dependencies needs some distance from the dependency list.

(Bitbake rev: 2c576552118bcfe65d375ff809b3b4a4916da225)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 088c19d644 bitbake: toastergui: consistent add / remove layer notifications
In my struggle to ensure consistency in the format and content
of the notifications we show when you add and remove layers to
a project, I've:

* added the project name to the notifications
in the layer details page

* removed the 'Go to project configuration' link
from the notifications in the layer details page

This changes align the notifications we show in the layer
details page with the ones we show in the 'all' pages.

(Bitbake rev: 87deeb2016cbfdaff5531e1badb58761af6df848)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 571d551a2d bitbake: toastergui: remove redundant style declaration
The bottom margin for dd tags nested inside forms is
set twice. Delete one of them.

(Bitbake rev: 4fcea0aad1ac715d6eb104f60972007bc2289569)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena c04977563f bitbake: toastergui: Generic message for the layer details empty states
In the layer details page, change the message you see when
the number of targets or machines provided by a layer is
0, either because that's what's reported by a layer index
instance, or because Toaster does not have any information
about the layer.

The new message is more generic, in order to fit layers from
all layer sources.

(Bitbake rev: 48123b53d66de01ad6273140aa148276d63707ba)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 24979f5219 bitbake: toaster: apply common styles to right hand column of detail pages
Layer, recipe and package details pages have a right column
with additional information. This commit standardises the
formatting of the content in that right column across
all these pages by creating a new css class .item-info
in default.css

(Bitbake rev: aed92feac017c967834575344faa3bad7a905b18)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena a11a34c60f bitbake: toaster: make layouts consistent
The layer details page should have the same layout as all
other detail pages (recipes, packages). For this to happen,
the basebuilddetailpage.html and baseprojectpage.html
templates should use the same layout, and so should the
layerdetails.html and recipe.html templates.

This patch also capitalises the string 'All layers' in the
breadcrumb of layerdetails.html as all other breadcrumb elements.

(Bitbake rev: 49d56fcbbf6b7d0c0c589b93182e4c73071b3fcf)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:33 +00:00
Richard Purdie 745cebd635 bitbake: siggen: Ensure taskdata default functions exist in base class
The get/set_taskdata functions are now part of the API of the class,
ensure they exist in the base class definition so the noop handler
works.

[YOCTO #7233]

(Bitbake rev: 9b5b1bd7d77e3f5886f6c557d3b750de1f6d6025)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 14:39:44 +00:00
Richard Purdie 9538ee9191 bitbake: cooker: Use expanded_data for ASSUME_PROVIDED
Users expect operators like _remove to work on this variable. We need
to use expanded_data to ensure this happens correctly.

[YOCTO #7135]

(Bitbake rev: cc4c8478fc547ea0ebf827a8d319496b39f25684)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:55 +00:00
Richard Purdie 4eb3ffe571 bitbake: cooker: Rename event_data -> expanded_data
event_data would be better named expanded_data, then we can widen its scope
to other places in cooker where we need to access an expanded data store.
We certainly don't want multiple expanded data stores.

(Bitbake rev: 1a3c1c9203e1a1452314954f1cfd771e5c1ce89b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:54 +00:00
Richard Purdie 793f2f2e69 bitbake: server/process: Fix select call
There was a report that bitbake -e | less would use 100% cpu when it shouldn't
really. The issue appears to be a bogus file descriptor in the select call. We
shouldn't be blocking if there is event data pending to a *reader* from server
context.

[YOCTO #7138]

(Bitbake rev: 8f166e1a0f3574ae7d1e917a8bb403b87bad15bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:54 +00:00
Alexandru DAMIAN d95e988c83 bitbake: toastergui: enable re-ordering when columns are hidden
This patch enables table re-ordering when a sorted-by column is hidden.
This is default functionality in toaster table pages, but was not
enabled for all columns in this situation.

[YOCTO #7125]
[YOCTO #7022]

(Bitbake rev: c1b9c7a05c1c05fcd73d819e8b0142169106f0da)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 02c49c229e bitbake: toastergui: all projects column show/hide
This patch fixes the show/hide in all projects page.

(Bitbake rev: 1d07020049d3bd824f6d0280c1cc7effa3db339d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Belen Barros Pena ca8c634279 bitbake: toastergui: fix the second 'view all targets' link
The project page has 2 links to the all targets page.
The one at the top of the page is working, but not
the one further down. This patch sorts that out.

[YOCTO #7147]

(Bitbake rev: ad6a2d42b9ce7ce317184d978253e5506be7e47f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 2dba91727d bitbake: toastergui: minor fixes
This is a minor fixes patch.

- legacy sorting by "timespent" does not crash the builds pages
- missing xhr_configvaredit view in observer mode is added

(Bitbake rev: bd4ff7a15e74e1d4af8ea3dbaaed141678046a9b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 08e5a49afb bitbake: toastegui: project page build selected targets
Fixing the action on the "Build selected targets" button.
Remove "build-button" duplicate id from the build page.

[YOCTO #7047]

(Bitbake rev: 8278d7b15b58484af93d952e594f29dabb9200a9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN c546815eee bitbake: toastergui: fix all targets page search
This fixes the display of layers in all-targets page search/filtering
usage pattern by displaying layer-equivalence class.

The significant impact is the correct display of the list size
for search/filtering actions

[YOCTO #7051]

(Bitbake rev: 4957ec63a11d51dfac2252263e4d26c705eb31e9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 4571c827a4 bitbake: toastergui: fix all-targets redirect
Fixes the all targets redirect to /api/1.0/targets.

[YOCTO #7147]

(Bitbake rev: f1cccafb4c7aa2c338e29ec5d2ea190dfeceb132)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 8e3be3f268 bitbake: toaster: newproject default release selection fix
This patch fixes the default project release selection to
obey the DEFAULT_RELEASE name set in ToasterSettings.

[YOCTO #7035]

(Bitbake rev: bcd7ba013b973d3b3ac1e0845acf60b80cb227c2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN bdbc37f5c6 bitbake: toastergui: "Run again" button in build pages
This patch fixes the "Run again" button for the completed builds.

[YOCTO #7173]

(Bitbake rev: 37125f2b52492f8bee465611e60514b365541892)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN 99bbf30b1d bitbake: toastergui: fix duplicate IDs all builds page
This patch fixes the duplicate IDs found in the all builds page,
originating in the "Project" column filter.

Also fix misspell "Log1" instead of "Log".

(Bitbake rev: bd681cb2ce349dd7de01c98d5089a368c4514c37)

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

[YOCTO #7021]

(Bitbake rev: 4f5b19d453da64749affc1c27ec51b013bedc71a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN 4dc8edb610 bitbake: toastergui: save cookie for orderby/page size settings
We save the current settings as cookies on the server side
for the layers, targets and machines pages under Project pages.

[YOCTO #6961]

(Bitbake rev: 58b35c055e37b5e1552d8ba3db2e05ea4ee85023)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Richard Purdie 8da8a0e55e bitbake: prserv/serv: Improve exit handling
Currently, I'm not sure how the prserver managed to shut down cleanly. These
issues may explain some of the hangs people have reported.

This change:

* Ensures the connection acceptance thread monitors self.quit
* We wait for the thread to exit before exitting
* We sync the database when the thread exits
* We do what the comment mentions, timeout after 30s and sync the database
  if needed. Previously, there was no timeout (the 0.5 applies to sockets,
  not the Queue object)

(Bitbake rev: 0926492295d485813d8a4f6b77c7b152e4c5b4c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:31:58 +00:00
David Reyna 6abcc6118d bitbake: toaster: project configuration variables page
Implement the project configuration variables page.

AlexD made whitespace changes and a minor fix.

[YOCTO #6588]

(Bitbake rev: 909fa19f20e909820aa484967b7fe2a34d89ab49)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Alexandru DAMIAN d1dbf4c078 bitbake: toaster: project builds page
This is a complete re-write of the "Project builds" page
based on the "All builds" page in managed mode.

[YOCTO #6589]

(Bitbake rev: 0353d49ae934c4595408e1b7a1443769f095f2aa)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Ross Burton 9a51fb39db bitbake: fetcher: use os.path.splitext() instead of string.split()
(Bitbake rev: 1689edd35477a126bfbf4bd3257c4f1f9e16f20d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Ross Burton f0d5edc91e bitbake: bin/bitbake: only check that /dev/shm is writable on Linux
(Bitbake rev: 7a87ca9518f7239a2dfeb4576c59ea7b1f8d3071)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Aníbal Limón a67b855df6 bitbake: bb/fetch2/wget.py: latest_versionstring escape packagename when built regex
When built package regex for use in searching upstream version in sites,
the package name need to be escaped to avoid usage of special regex
char.

For example when search for gtk+, '+' need to be escaped.

(Bitbake rev: 1aa1de4b0c5bd34466e04844bbc371933736be59)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Robert Yang c6f933e5cf bitbake: cooker.py: trap the ENOSPC error and translate it
Trap the ENOSPC error and translate it into a human readable error
message, which is good for debugging.

(Bitbake rev: 2b084dff6ff0d274fbbf7ab07022507f7249e427)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie e63723f59a bitbake: cooker: Further optimise pyinotify
We currently add crazy numbers of watches on files. The per user limit is 8192
by default and on a system handling multiple builds, this can be an issue.

We don't need to watch all files individually, we can watch the directory containing
the file instead. This gives better resource utilisation and better performance
further reverting some of the performance regression seen with the introduction
of pyinotify.

(Bitbake rev: a2d441237916a99405b800c1a3dc39f860100a8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie db45ddeeaf bitbake: command/cooker/knotty: Fix memres handling of command environment changes
If the environment changes, we need memory resident bitbake to adapt to those
changes. This adds in functionality to handle this alongside the configuration
option handling code. This means that the common usage:

MACHINE=X bitbake Y

now works with the memory resident server.

(Bitbake rev: 4d1343010da757a0c126bc22475354da44aaf8e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie 08d3f44d78 bitbake: lib/fetch2: Tweak get_srcrev() function description
Tweak the comments on get_srcrev() to better describe its function.

(Bitbake rev: b4d40f1ac7b32990c456cce261f99a5a157b5ae5)

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

[YOCTO #7117]

(Bitbake rev: 8118f465b9f87c66b2a741008f69198ac5fea901)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Alexandru DAMIAN 2d78912bc6 bitbake: toastergui: all builds page lists failed build requests
This patch modifies the all builds page by splitting the page
into two variants - the "interactive" (default) and "managed" mode
versions.

In the "managed" mode version, we display build requests instead of
builds, including the failed build requests that have no build
associated with them.

[YOCTO #6671]

(Bitbake rev: c5f5fb80308228585aa7ff9721352feb5ed9c961)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Michael Wood ce784879f4 bitbake: toaster: layerdetails Remove compatibility setting
Remove the layer compatibility configuration option from the layer
details as this is not in the design.

(Bitbake rev: c46492f5599da8af16af05ecc2d7aa7a8660416b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Michael Wood 025533d90b bitbake: toaster: Add layer details page feature
This commit adds the layer details page which shows the metadata for the
layer such as layer description, machines associated with the layer as well
as the targets provided.
If the layer is an imported layer this page also allows you to update
the layer's configuration.
>From this page you can add/remove the layer from the current project

(Bitbake rev: c1442bc68ad8ba20c37b1a7cde1400297f4be811)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Richard Purdie 2a6f739f1d bitbake: ConfHandler: Clean up bogus imports
The import statements here are plain bizarre. Remove them, tweaking
some of the function calls to match current practices. I can't find any
reason these old imports are as they are.

(Bitbake rev: 4c2f1fe51a13ddc97e518327714292af46b9e1ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie 5c9e2b2f43 bitbake: ConfHandler: Rename oldfn to parentfn to be clearer
Looking at this function I had no idea what oldfn was, I doubt anyone
else would either without looking up what the caller does. "parentfn"
would seem a more appropriate name so rename it.

(Bitbake rev: fc70ed596703a1aa954223b169d4ad51193a6ec1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie 967f13fda0 bitbake: cooker: Improve pyinotify performance
Benchmarks show that the introduction of pyinotify regressed
performance. This patch ensures we only call the add_watch() function
for new entries, not ones we've already processed which does improve
performance as measured by "time bitbake -p".

This doesn't completely remove the overhead but it does substantially
reduce it.

(Bitbake rev: 493361f35f6cc332d4ea359a2695622c2c91a9c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie eb7480fc4d bitbake: cooker: Fix pyinotify handling of ENOENT issues
We try and add watches for files that don't exist but if they did, would influence
the parser. The parent directory of these files may not exist, in which case we need
to watch any parent that does exist for changes. This change implements that fallback
handling.

(Bitbake rev: 979ddbe4b7340d7cf2f432f6b1eba1c58d55ff42)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 13:34:06 +00:00
Richard Purdie 6c3c3e11f6 bitbake: cooker/cache/parse: Implement pyinofity based reconfigure
Memory resident bitbake has one current flaw, changes in the base configuration
are not noticed by bitbake. The parsing cache is also refreshed on each invocation
of bitbake (although the mtime cache is not cleared so its pointless).

This change adds in pyinotify support and adds two different watchers, one
for the base configuration and one for the parsed recipes.

Changes in the latter will trigger a reparse (and an update of the mtime cache).
The former will trigger a complete reload of the configuration.

Note that this code will also correctly handle creation of new configuration files
since the __depends and __base_depends variables already track these for cache
correctness purposes.

We could be a little more clever about parsing cache invalidation, right now we just
invalidate the whole thing and recheck. For now, its better than what we have and doesn't
seem to perform that badly though.

For education and QA purposes I can document a workflow that illustrates this:

$ source oe-init-build-env-memres
$ time bitbake bash
[base configuration is loaded, recipes are parsed, bash builds]
$ time bitbake bash
[command returns quickly since all caches are valid]
$ touch ../meta/classes/gettext.bbclass
$ time bitbake bash
[reparse is triggered, time is longer than above]
$ echo 'FOO = "1"' >> conf/local.conf
$ time bitbake bash
[reparse is triggered, but with a base configuration reload too]

As far as changes go, I like this one a lot, it makes memory resident bitbake
truly usable and may be the tweak we need to make it the default.

The new pyinotify dependency is covered in the previous commit.

(Bitbake rev: 0557d03c170fba8d7efe82be1b9641d0eb229213)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:02 +00:00
Richard Purdie 83f8a4002a bitbake: bitbake: Add pyinotify to lib/
We need inotify support within bitbake and pyinotify provides the best
mechanism to add this. We have a few options:

a) Depend on pyinotify from the system
b) Add in our own copy
c) Only use pyinotify in cases like the memory resident server

For a), it would mean adding in dependencies, updating documentation and
generally creating churn for users as well as having implications for things
like the build-appliance recipe.

It turns out that glibc has the C functionality we need from version 2.4
onwards (2006) and that we just need a single python file for b), there
is no binary module needed. We therefore add in a copy of pyinotify 0.9.5
into the tree meaning we can depend on it simply and unconditionally.

c) is unattractive as we need fewer possible code paths, not more.

(Bitbake rev: d49004a4e247e3958a2f7ea9ffe5ec92794e1352)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:02 +00:00
Aníbal Limón 3cd31b19d3 bitbake: bb/fetch2/ssh.py: Fix urldata.localpath use os.path.normpath
When urls ends with trailing slash os.path.basename return "" [1]
and built urldata.localpath only with DL_DIR, it causes that
donestamp is built as DL_DIR + '.done' and seems that ssh resource
was already download.

[YOCTO #6448]

[1] https://docs.python.org/2/library/os.path.html#os.path.basename

(Bitbake rev: 47992591349bab2c12741b937096e41085399087)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:01 +00:00
Richard Purdie 83a30dfd49 bitbake: fetch/git: Improve ls-remote handling for latest_revision
Currently the code ignores lightweight tags which has caused some user
complaints. We can't put the right search list in place easily since
the results don't come back in a good order, head happens to sort
before tags.

In the end I refactored the function so we get the complete list of
remotes and then we can filter it ourselves in the order we chose,
including checking for light weight tags, preferring the proper ones.

Hopefully this resolves the issues people have been seeing.

[YOCTO #6881]

(Bitbake rev: 07ad307065bb15a48f0015b9e4a643201abdc283)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:01 +00:00
Alexandru DAMIAN 876370419a bitbake: toaster: implementation of project page
This patch brings the project page in line with the design,
including build error handling and suggestions.

Includes some refactoring for already existing code.

[YOCTO #6587]

(Bitbake rev: 1ea658dcdfde5465d3ecdb97550e0a66cb8b122e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:38 +00:00
Alexandru DAMIAN 66e1b520d7 bitbake: toaster: branch name priority resolution
Adding a Layer_Version function that gets back the
branch name that should be used/displayed for finding the
targeted git branch name.

Change the commit id to use the branch name instead of the
last-updated commit hash from the layer source.

[YOCTO #7031]

(Bitbake rev: 1a52202f7f3719f5421289aaf0fc8eba0bf4c7ce)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:37 +00:00
Alexandru DAMIAN 3e73af423f bitbake: toaster: do not launch web browser on noweb option
This patch makes Toaster managed mode obey the "noweb" parameter
by not starting the web server and launching the web browser
command if the "noweb" parameter is specified.

The web browser will be pointed at 127.0.0.1 instead of 0.0.0.0

[YOCTO #7039]

(Bitbake rev: 4037f8b08bc9fb5c4c9f260efb847105be718a32)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Alexandru DAMIAN 3c37669272 bitbake: toaster: write pre-read conf file for build variables
We change the setting of variables from directly injection
into the set-up cooker to writing a conf file that is pre-read
on bitbake server startup. This is needed because the injection
can only happen after the variable set is parsed, and the variables
already inferred, so setting up variables happens too late.

[YOCTO #7045]

(Bitbake rev: 854f680b5b9d2d0fa796af84cb1218545fbfc55a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Michael Wood ed9fa17467 bitbake: toaster: Improve client side error handling
Make use of the toastermain.settings.DEBUG flag to toggle the client
side error logging. Make the error logging consistent by using
console.warn/error across the project, this adds traceability to the
warnings. Also handles the case where console is not available by
stubbing it in libtoaster.

(Bitbake rev: c34ebc51a6cbf90c64ef1ac461e475c6341f0f2a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Richard Purdie 2e26745a13 bitbake: ast: Add error when trying to use dash in sh function names
A dash character is illegal in function names in sh (but not bash). Since
our shell tasks run under sh and the shell parser is sh based, EXPORT_FUNCTIONS
won't work with class names containing a dash.

We can't change sh, we can ensure the user is warned about the problem
straight away though.

[YOCTO #7006]

(Bitbake rev: 86704281b79e524dccccc88cbf996b299b33bae2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 10:38:36 +00:00
Richard Purdie 97d44bf526 bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums
Currently, if you reference a file url, its checksum is included in the
task hash, however if you change to a different file at a different
location, perhaps taking advantage of the FILESPATH functionality, the
system will not reparse the file in question and change its checksum to
match the new file.

To correctly handle this, the system not only needs to know if the
existing file still exists or not, but also check the existance
of every file it would have looked at when computing the original file.

We already do this in the bitbake parsing code for class inclusion. This
change uses the same technique to log the file list we looked at and
if files in these locations exist when they previously did not, to
invalidate and reparse the file.

Since data stored in the cache is flattened text, we have to use a string
form of the data and split on the ":" character which is ugly, but is
an internal detail we can improve later if a better method is found.

The cache version changes to trigger a reparse since the previous
cache data is now incompatible.

[YOCTO #7019]

(Bitbake rev: 6c0706a28d72c591f1b75b6e3f3b645859387c7e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 26cd67e63a bitbake: wget: Add localpaths method which gives localpath with history
In some cases for cache purpoes we not only need to know which file
is going to be used but also which paths were considered. Add a
localpaths method which includes the history.

The core which() funciton already supports this, this just extends
the function to preserve the extra data we need. localpath becomes
just a special case of the case with history.

(Bitbake rev: ea5efeac5c1f7986666c979f789786f29fc1619a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 130958cc24 bitbake: bitbake-worker: Use setsid() rather than setpgid()
The bug has a long discussion of this. Basically, in some environments,
the exact details of which aren't understood, a Ctrl+C signal to the
UI is being transmitted to all the process children. Looking at the output
of "ps ax -O tpgid", its clear the main process is still the terminal
owner of these processes.

stty -a on a problematic system shows: "-ignbrk brkint"
and on a working system shows: "-ignbrk -brkint"

The description of brkint would suggest this is the problem, setting up
that terminal environment wasn't able to reproduce the problem though.
It was confirmed that using setsid() caused the problem to be resolved
and is probably the right thing to be doing anyway, so lets do it.

[YOCTO #6949]

(Bitbake rev: 461aa73fff0ab616032d28c4fd0322eb88838be6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:46:58 +00:00
Richard Purdie 1393e224b5 bitbake: cooker: Shut down the parser in error state
If the cooker is in an error state, we shouldn't continue to try parsing.
This fixes an issue where an invalid PR server is detected when bitbake
is started and ensures bitbake exits cleanly rather than hanging.

[YOCTO #6934]

(Bitbake rev: 294bb9cad294423d4f8998405ceff58655f12660)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:42:24 +00:00
Paul Eggleton 8b8d46f31e bitbake: utils: make edit_metadata_file() handle VARIABLE +=
This is a little crude as the usage basically ignores that you're doing
an append operation, but for a lot of cases it will be sufficient.

(Bitbake rev: 24a28205ab680b6cc645d97b76c9855920608229)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Paul Eggleton b264f5629b bitbake: bitbake-layers: fix error handling in add-layer / remove-layer
* Fix add-layer error message when a layer is already in BBLAYERS
* Ensure we show an error message if we can't find BBLAYERS at all

(Bitbake rev: 1c743fd2103730e27699dd55efc6914d3b0c3702)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Richard Purdie e75139cc9d bitbake: fetch2/wget: Fix horrible temp file handling
Hardcoding a temp directory is bad practice and leads to races between
the tests. There is no longer any good reason for doing this, drop it
and ensure the files get cleaned up correctly.

(Bitbake rev: 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 1d4908ddb2 bitbake: tests/data: Add a key deletion test
If you copy the datastore, then delete a key, it should not exist in
d.keys(). This adds a test to cover the recently found data store bug.

(Bitbake rev: 16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 4d06fb7307 bitbake: tests/fetch: Add versionstring tests to network tests list, fix print()
The versionstring tests hit the network so should only run when
network tests are enabled.

Also remove the print statement which confuses the test output and
add it to the test failure message instead.

(Bitbake rev: 6c046660cfc4fb3792a42aeafff91a13f68a2e89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 544533922d bitbake: data_smart: Ensure d.keys() doesn't list deleted variables
If you copy the datastore, then delete a variable, it still shows up
in d.keys() when it should not. This patch addresses the issue.

(Bitbake rev: f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:13 +00:00
Aníbal Limón 8c906632e7 bitbake: bb/fetch2/wget.py: latest_versionstring fix multithread and remove deprecated code
In order to fix multithread usage of latest_versionstring moves package_custom_regex_comp
from class to method level because need to be defined by package.

Remove code for build url's with /download suffix because it's deprecated since you can
specify the download directory using package_regex.inc file.

(Bitbake rev: 231cae9f9b552ec6737795c098d1de426b5adcbc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Andy Voltz 6b33e1a840 bitbake: ui/ncurses: Update ncurses ui to accept configParams
(Bitbake rev: 730b4c50364fba7173309278d670eda02e0ce38e)

Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton d31b7bdf11 bitbake: cooker: add ability to ignore unmatched regexes in BBFILE_PATTERN
Add a BBFILE_PATTERN_IGNORE_EMPTY variable to allow ignoring the fact
that a regex specified in BBFILE_PATTERN for a particular collection
doesn't match any recipes. This will be used in OpenEmbedded in the
workspace layers created by "devtool" which may not always contain any
recipes (which is not cause for warning the user).

(Bitbake rev: 19c74aaa2836a88d666f0032452fac521689ab6b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton db3f589f49 bitbake: bitbake-layers: add commands for adding and removing layers
Add add-layer and remove-layer commands for easily adding and removing
layers to/from bblayers.conf.

(Bitbake rev: 0e94aed033917b91ea6ba0522b14a040c3bdc987)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton b1e5a6794f bitbake: utils: add basic metadata manipulation functions
* Add a generic edit_metadata_file() function to modify variable
  assignments in any metadata file (conf, bb, bbappend) using a callback
  for flexibility
* Add a specific edit_bblayers_conf() function to modify
  conf/bblayers.conf and add and/or remove layers from the BBLAYERS
  value within it.

(Bitbake rev: aa03a28b442549dd8ffe92ae4d6390f62202a76a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:20 +00:00