Commit Graph

3788 Commits

Author SHA1 Message Date
Alexandru DAMIAN f169733738 bitbake: toaster tests: gitignore and use absolute path for log file
gitignore the cache directory created by the http client

the log file for tests is already set up as an absolute path,
so no need to recompute the path

(Bitbake rev: 80f525e5cbe83e0407ecddf84401d68213c6d5cf)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:27:52 +01:00
Alexandru DAMIAN 73f14975c5 bitbake: toaster: tts: clean up HTML5 compatible url list
This patch cleans up the list of URLs that are tested for
HTML5 compatibility using the w3c-validator. It removes
the URLs that are no longer in use, and the AJAX-only URLs
that return JSON content.

(Bitbake rev: c85a35e37150ee8be091bd142cac8a1885f1dff0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Alexandru DAMIAN 1640a65091 bitbake: toaster: tts: fix pylint warnings
This patch brings TTS to the pylint coding standards.
Pylint was run with some disables:

disable=logging-too-many-args,line-too-long,missing-docstring

and achieved

Your code has been rated at 10.00/10

There are no functional changes.

(Bitbake rev: 2b40b412ff6a7e3fd4cc32707bd3cd713bc09ddb)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 11:26:13 +01:00
Michael Wood 160d610604 bitbake: toastergui: Remove angularJS and projectapp based on angular
AngularJS proved unsuitable for the new project page implementation.

(Bitbake rev: 6f25846dbcaf007f58f9a32e58dcd564f6430fe9)

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>
2015-08-01 11:26:13 +01:00
Michael Wood 829fe32621 bitbake: toastergui: project page Add inline project name change feature
This feature allows the project name to be changed from where ever it is
displayed in the project pages.

[YOCTO #7329]

(Bitbake rev: 81cb1cd1aa900f29a25d14dce93d301cd6b6fdb7)

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>
2015-08-01 11:26:13 +01:00
Michael Wood c76137e25b bitbake: toastergui: layerBtn use libtoaster for change notification
Use the common functionality for change notifications.

(Bitbake rev: 79af72e1b80b033a37992095b2e97449de5ebd8b)

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>
2015-08-01 11:26:12 +01:00
Michael Wood b90a253fa6 bitbake: toastergui: newbuildbutton Fix removed elements
All the elements for the new build button need to be present for the
build button to work. Now that the template variables all have to have
values we have to make sure that the elements are still added to the dom
for the js to manipulate them.

(Bitbake rev: e2ab67eaf76da9ee2009e8420d5584c3daa97ac1)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 11627fc10f bitbake: bitbake: toastergui: newbuildbutton Fix typo on project save function
project.id rather than project.pk.

(Bitbake rev: 047df808203f3779243eb88c069757f7a7b7bbed)

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>
2015-08-01 11:26:12 +01:00
Michael Wood c385f1551b bitbake: toastergui: Change build button popover to a build-button
To share the build-button mechanism from the pop over and project
topbar build button we now use a build-button class to reference them
and share the event handlers.

(Bitbake rev: e3c6a00b848a6f147e93c8da46b8a3516499fde8)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 10ffe1b8cc bitbake: toastergui: base Use removeAttr / attr
Use removeAttr and attr calls to enable and disable the build button and
build input field.

(Bitbake rev: c3753948bd00c3498ca3e76cb218eb6cf423c3e3)

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>
2015-08-01 11:26:12 +01:00
Michael Wood be2b4239f6 bitbake: toastergui: Fix Duplicate layer importlayer api calls
As the JSON response changed the duplicate layer functionality wasn't
wasn't working as the field names in the returned data changed. This
patch brings the field names back in sync with the response.

(Bitbake rev: bdea86ae8720ee5792a5617c6073d51922a224ff)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 1a2f12099c bitbake: toastergui: libtoaster: Add guard against missing name property
Add a debug warning if a JSON payload isn't compatible. i.e. without a
name field.

(Bitbake rev: e65de693670203ddcbf5f23ad2a91c523df879d8)

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>
2015-08-01 11:26:12 +01:00
Michael Wood a9549e839d bitbake: toastergui: libtoaster Make sure we always pass format=json
The new API for typeahead requires that we pass this parameter in to make
sure we get a JSON response.

(Bitbake rev: 2f8951d6e640d86f605b082aab4a950dab9065ad)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 691d547178 bitbake: toastergui: css Remove redundant css rules
The machine change notification animation is no longer required in
favour of the global overlay notification.

(Bitbake rev: aef36f2674d3d82b1757c02ffbf8b72fd4f32a4e)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 80c1586bbb bitbake: toastergui: Add new project page and navigation
This brings in the new project page design and improved navigation. As
this also removes the dependency on Angular it also required that the
entry points to the project page such as machine-change notifications
are also updated.

[YOCTO #7329]

(Bitbake rev: 6489e6eb5c3b0d59063b6d60521fc33fe563e707)

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>
2015-08-01 11:26:12 +01:00
Michael Wood 258c929973 bitbake: toastergui: css Add new rules for new project page
Add new css rules needed for new project page.

(Bitbake rev: 6457d8fa30ac2b9b7413b8e9a7c5806bace10141)

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>
2015-08-01 11:26:11 +01:00
Michael Wood 9af7ce513c bitbake: toastergui: http api Add guard against incomplete change requests
If we get a request to the project change api which either contains the
current configuration (i.e no change) or empty configuration handle this
gracefully.

(Bitbake rev: cc6c606c07baadc849c3290b23c56ad4e719fba2)

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>
2015-08-01 11:26:11 +01:00
Michael Wood 7a589c0b20 bitbake: toastergui: tables Add name field to layers table
This field is required by the typeahead in the new project page to do
the name matching on.

(Bitbake rev: dbce3b43094b0a123b0d63aa07cc4f9547630094)

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>
2015-08-01 11:26:11 +01:00
Michael Wood 8ff56b0fb3 bitbake: toastergui: libtoaster Add show change notification function
Now that we have a change notification that is global move this
functionality to libtoaster for shared use.

(Bitbake rev: 9d760462de99cb8729b7e0db773e77d4cd508733)

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>
2015-08-01 11:26:11 +01:00
Michael Wood 1b13222e1c bitbake: toastergui: Standardise the layer object property layerdetailurl
To be able to use the utility functions in libtoaster  we need to have a
single property name for the value that represents the url for the
layer details in the layer object.

(Bitbake rev: 4d64fd0d1236d342b29537f601a68cd23a8255ea)

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>
2015-08-01 11:26:11 +01:00
Michael Wood df999d2ac1 bitbake: toastergui: Remove erroneous CSS property
Remove a CSS property value which is missing a corresponding key.

(Bitbake rev: 770008f8ff3f8aa4f90636621a4162d676a71da7)

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>
2015-08-01 11:26:11 +01:00
Michael Wood dd8c78b07a bitbake: toastergui: importlayer Add format type to JSON calls
After API was changed we now need to pass the parameter "format=json" as
a get parameter when requesting a json payload. Otherwise we get the
html version of the page instead of the data we need.

(Bitbake rev: 4545c21b70998bd240c3a21de05e8d4642044119)

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>
2015-08-01 11:26:11 +01:00
Michael Wood d826d4e800 bitbake: toastergui: base Fix html indentation
(Bitbake rev: 37364e671ad1897bef818239a8e289b3d4c93925)

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>
2015-08-01 11:26:11 +01:00
Michael Wood b06a633f25 bitbake: toastergui: Implement new project navigation
Change the structure of the project page to include a navigation menu
and top tab navigation. Remove old breadcrumb method.

[YOCTO #7329]

(Bitbake rev: 66fa0dd988e01ec79e74be7a5697eaa3b4f017d8)

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>
2015-08-01 11:26:11 +01:00
Michael Wood 3d3a2dbf5f bitbake: toastergui: Implement new top navigation design
Additional items for top level navigation. This is part of a wider
navigation redesign.

[YOCTO #7329]

(Bitbake rev: 456a4a6782d3098cc9abb39659a619fdcf52eb01)

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>
2015-08-01 11:26:10 +01:00
Alexander Kanavin 8acab25832 bitbake: wget.py: fix incorrect regexes
[\.-_] means "any character between . and _"
What was meant here is certainly "any character from the three characters .-_"

(Bitbake rev: af13eaba627f199f91c048c435b9dbe19c79527f)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 07:34:09 +01:00
Richard Purdie 4c2f28bf48 bitbake: cooker: properly fix bitbake.lock handling
If the PR server or indeed any other child process takes some time to
exit (which it sometimes does when saving its database), it can end up
holding bitbake.lock after the UI exits, which led to errors if you ran
bitbake commands successively - we saw this when running the PR server
oe-selftest tests in OE-Core. The recent attempt to fix this wasn't
quite right and ended up breaking memory resident bitbake. This time we
close the lock file when cooker shuts down (inside the UI process)
instead of unlocking it, and this is done in the cooker code rather than
the actual UI code so it doesn't matter which UI is in use. Additionally
we report that we're waiting for the lock to be released, using lsof or
fuser if available to list the processes with the lock open.

The 'magic' in the locking is due to all spawned subprocesses of bitbake
holding an open file descriptor to the bitbake.lock. It is automatically
unlocked when all those fds close the file (as all the processes terminate).
We close the UI copy of the lock explicitly, then close the server process
copy, any remaining open copy is therefore some proess exiting.

(The reproducer for the problem is to set PRSERV_HOST = "localhost:0"
and add a call to time.sleep(20) after self.server_close() in
lib/prserv/serv.py, then run "bitbake -p; bitbake -p" ).

Cleanup work done by Paul Eggleton <paul.eggleton@linux.intel.com>.

This reverts bitbake commit 69ecd15aece54753154950c55d7af42f85ad8606 and
e97a9f1528d77503b5c93e48e3de9933fbb9f3cd.

(Bitbake rev: a29780bd43f74b7326fe788dbd65177b86806fcf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01 07:34:09 +01:00
Andre McCurdy 1b88b7426a bitbake: build: Exit scripts with result of last shell function
Since shell scripts run with 'set -e' the final exit at the end of the
script can only be returning 0. However, for correctness and to follow
the original intention of the 'cleanup' commands, let's fix the typo
and return the success of the last shell function rather than the
success of unhooking the exit trap handler.

(Bitbake rev: bef724057f1ea81571dd3ac5a9cf862f818434b5)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27 23:29:16 +01:00
Richard Purdie f5f6748b75 bitbake: data_smart: Improve override history logging
Calling record() for each override alteration is slow. Since we now expand
overrides dynamically we don't have to record the log data at each alteration,
we can instead print it directly from the existing data stores at variable
history print time using the exact same data stores.

This massively improves performance of the data store when parsing
with bitbake -e for example, it will improve memory overhead as well.

The only downside is that VariableHistory has to poke into the datastore
for some of its data but that seems an acceptable tradeoff rather than
double caching.

(Bitbake rev: 100b447a161ef20fa559e39516cd32fa78e38262)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24 23:28:35 +01:00
Richard Purdie 9901415ecd bitbake: data_smart: Improve performance of infer_caller_details()
As things stand now, bitbake -e (which turns on all the caller tracking)
of OE-Core generates around 9.5 million stat calls which is slow and the
largest single thing on the profile data.

This is because infer_caller_details() calls traceback.extract_stack()
which adds line contents to the traceback. This in turn calls python's
internal linecache code which calls stat on every file for every callback.
We don't even use that info. We only even want a single frame of the stack.

Instead, open code for the pieces of information we need. Also, only
obtain the stack once for both halves of the infer_caller_details()
code.

This reduces the number of stat calls to around 0.5 million and significantly
improves parsing with bitbake -e.

(Bitbake rev: 7be76d8f79ea92fd4bd36146eb9a4b86551b526d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24 23:28:35 +01:00
Richard Purdie 67c6cc854f bitbake: data: Clean up datastore accesses and True/False values
We should use the d.xxxVar syntax rather than the older function style.

Also replace 0/1 with the more pythonic True/False.

No functionality changes.

(Bitbake rev: 90fdd69cca951f8bd2ff634f3b42fccd4fc03095)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24 23:28:34 +01:00
Andre McCurdy fdfb3fdc5b bitbake: data: Add newline after the last export in emit_func
Minor formatting improvement in generated shell scripts.

Add a newline after the last export emitted by emit_func. Also, remove
chance of putting an extra newline in the middle of the exports, since
we never want to do that.

(Bitbake rev: 5117d9b5d32d5d81adf70fa3e3feac9cef654240)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24 23:28:34 +01:00
Richard Purdie ada930055d bitbake: tinfoil: Add shutdown method
One drawback to tinfoil is that once a cooker is created, it will hold
the cooker lock and stop any other bitbake execution against a directory.

Add a shutdown method to tinfoil, allowing other users to use
the build directory after the tinfoil usage is no longer needed.

(Bitbake rev: e44ce85fe551677fc0dcc1da4f789a0c13093ff1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-24 23:28:34 +01:00
Richard Purdie 901be2cb69 bitbake: bitbake-selftest: Add -v option for verbosity
Also document BB_SKIP_NETTESTS=yes parameter in --help output.

(Bitbake rev: 5196bfa9639eed2b1e6452f45775551203f8eeb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:41 +01:00
Richard Purdie aaea533e70 bitbake: tests/parse: Add BBCLASSEXTEND multiple data store corruption reproducer
One data store changing a variable poked through into a different data
store. This test case replicates that issue where the value 'B' would
become unset/disappear.

We also enhance parsehelper to generate files with an optional suffix
such as bbclass.

(Bitbake rev: 5c4179f58a4e04f1c354df5f17d1860eb403f0ac)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:41 +01:00
Richard Purdie 19f290f223 bitbake: data_smart: Add CoW approach for overridedata
Using deepcopy() caused a major performance regression. Turns
out we can work with a shallow copy as long as we force the
recreation of any list that we change, effectively a poor mans
CoW. This isn't too invasive and avoids the huge overhead of
deepcopy so this seems like the best way to have performance and
a working data store.

(Bitbake rev: 32dff4749c32f32e947c42c86f8357b8b607354b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:41 +01:00
Aníbal Limón 205c39bf78 bitbake: tests/fetch.py: Updated test name FetchMethodTest -> FetchLatestVersionTest
Change the test name to be more specific on what is tested.

(Bitbake rev: 3e39156bc330c4c726058a5b9c13d33e2daad89f)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22 08:23:50 +01:00
Aníbal Limón 22d2f7b1ca bitbake: fetch2/wget.py: latest_versionstring now returns (version, revision)
Now latest_versionstring method returns (version, revision) for comply
the new return convention needed by SCM's like git get the current
revision.

bb/tests/fetch.py: Updated wget latest_versionstring test for comply new
convention.

[YOCTO #7605]

(Bitbake rev: 8d454646cbe1b04758ca178d8c6fcfd02b818b7b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22 08:23:50 +01:00
Aníbal Limón bd5167d154 bitbake: fetch2/git.py: latest_versionstring now returns (version, revision)
We need to know the revision associated with the upstream version in
SCM like git, this change broke return convention, oe-core recipeutils
get_recipe_upstream_version need to be updated.

tests/fetch.py: Updated git latest_versionstring test for comply new
convention.

[YOCTO #7605]

(Bitbake rev: fd175dc90024c503134c11cbd83e77d88c406ac8)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22 08:23:49 +01:00
Aníbal Limón 4bbc5dd6e7 bitbake: fetch2/git.py: latest_versionstring search in all tags
Don't limit the tag search for only tags end with ^{}.

(Bitbake rev: 7006ab313766344cf33481228465082ed5977d28)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22 08:23:49 +01:00
Richard Purdie f5206e85b3 bitbake: data_smart: Use deepcopy for overridedata
dbus sets RDEPENDS_dbus-ptest_class-target = "X". nativesdk as
BBCLASSEXTEND was expanding and setting various RDEPENDS variables
which were clearing overrides queued against RDEPENDS. The problem
was that this was leaking into other data contexts such as the
target case. This was because overridedata was a shallow copy.

Replacing the shallow copy with a deep copy avoids this problem of
leakage between the data stores at a small performance penalty.

(Bitbake rev: 83e2923cd3c8f2e25987132f85b06ce72bc941d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 23:37:22 +01:00
Belen Barros Pena 9a92500306 bitbake: toastergui: make our tables Chrome-happy
Make sure that Toaster tables adapt nicely to the
viewport width in Chrome without squashing the
buttons in the right column (when they are there).

(Bitbake rev: 61307693a25a4a2eeeab5c450df330229638ddad)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 15:36:14 +01:00
Brian Avery 0c0ec86110 bitbake: toaster: continue processing layer dependencies despite errors
Sometimes, a layer dependency will not exist,
  or not exist for a particualr branch. In this case
  we need to continue processing and hope for the best.

[YOCTO #7955]

(Bitbake rev: 2961bf2612fce111a7be6cef285595a075200780)

Signed-off-by: Brian Avery <brian.avery@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 15:36:14 +01:00
Paul Eggleton d3809b77c4 bitbake: lib/bb: provide mechanism to bypass UI log suppression
The recent change to connect through the shell logging functions had an
unexpected side-effect - bb.error() and bb.fatal() cause a flag to be
set internally such that BitBake's UI will not print the full task log
on failure; unfortunately we have in places within the OpenEmbedded
metadata called these shell logging functions under error situations
where we still want to see the full log (i.e., the message we're sending
doesn't include the full error). Thus, provide a mechanism to fatally
exit with an error but unset the flag, utilising the built-in python
logging functionality that allows extra values to be passed in the log
record.

(Bitbake rev: e561b997c55e8537d82aa1339adfff4505cc38b7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:26 +01:00
Paul Eggleton 5261c5b5bd bitbake: lib/bb/process: check output of select() before reading extrafiles
We're calling select() to find the fds that have data available, so we
really ought to check the return to see if the extra file is in there
before trying to read from it. This is part of the fix for the
performance regression that this code introduced (5-10 minutes extra in
a reasonable size OE build); the rest is down to an issue in the way
that pseudo currently handles FIFOs and will need to be addressed there,
see: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7993

Solution suggested by Richard Purdie <richard.purdie@linuxfoundation.org>

(Bitbake rev: 3e2db8d7eaa0f14813213d1c95d3ee9efd97dc9d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:26 +01:00
Richard Purdie a730981b75 bitbake: tests/data: Add new data tests
Add a variety of tests which were found to be useful when working
on the data store recently.

(Bitbake rev: 5c5f8da509f6bbc1fad263462142519ef3d54a35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00
Richard Purdie 4c386e1dd5 bitbake: data_smart: Fix appendVar/prependVar
Now that overrides get expanded 'on the fly', change appendVar
and prependVar to work using _append and _prepend, else we'd have
to re-implement pieces of getVar and the timing of expansions
becomes problematic.

Using _append/_prepend equivalence gives the behaviour users likley
expect from these functions.

(Bitbake rev: 40d661aaf7a563c6447b073310c5f2fdae6ca3d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00
Richard Purdie 75a58555ab bitbake: data_smart: Fix data expansion cache issues
The expand cache can be cleared in the middle of getVar now
due to the use of operations like delVar. We therefore need
to check if variables are in the cache before accessing in
case it was cleared.

(Bitbake rev: a97ce216cfe44136f742383542954bfce027831e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00
Richard Purdie a259968611 bitbake: data_smart: Fix keys() missing overrides
d.keys() was not returning items which had no base content but the
variable came into existance through overrides. We have to process
self.overridedata to find these other variables.

(Bitbake rev: 77fc57c610d7f65f7e328ad555f525b2f8bdf1d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00
Richard Purdie 816acb6ee8 bitbake: data_smart: Cache set(self.overrides)
This performs better than continually regeneratiing the set().

Also only use set comparisions when its necessary to save some overhead
as issubset() is slower in the single item case.

(Bitbake rev: db9a4eedcf78969ec50bf0e4a8defba8ff0daa4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00