Commit Graph

3761 Commits

Author SHA1 Message Date
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
Richard Purdie 0ac9c80e08 bitbake: data_smart: Improve override recursion handling
When expanding OVERRIDES, its possible someone might try and override a variable
that is used in OVERRIDES. This could lead to infinite recursion. Add in
guards against this.

(Bitbake rev: 07d773369f571028c2cf82dd1f65d9731af6d00e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:46 +01:00
Richard Purdie 2dbb067eba bitbake: data_smart: Tweak OVERRIDES value cache for performance
Updating the value of OVERRIDES whenever it changes turns out to be
extremely expensve/pointless. Instead, clear its value and re-establish
the value when we're going to use it.

This gives significant speed back.

(Bitbake rev: 41cf8d0c92d2d8a33fdad0921e424a0024914be1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie d8ebb4708b bitbake: data_smart: Seperate out the override cache
Using an internal flag for override mapping turns out to be slower
than is optimal, not least as we don't want the keys list to list
variables that have no value other than a potential override expansion.

Maintinaing a seperate cache is therefore more optimal from a speed
perspective.

(Bitbake rev: 1a39ccf66b30b54e1274669cb0e1dc8fc72dba49)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie c690d5b818 bitbake: data_smart: VariableHistory: Ignore override duplicates and overlap with CoW functions
Trying to look up a variable called 'copy' in COW is problematic due
to internal implmentation details, at least avoid tracebacks from this.

Also don't duplicate override history (which is an atrefact of changed
override behaviour) as otherwise the bitbake -e output is convoluted.

(Bitbake rev: dddff5b7b8e6c18515b43389cef35503468b843d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie 933e19697b bitbake: parse/ast/data_smart: Add parsing flag to getVar/setVar
When parsing we find problems if we clear prepends/appends when
setting variables during the initial parsing phases. Later, we actively
want to do this (in what would be post finalisation previously).

To handle this, pass a parsing flag to the operations to control
the correct behaviour for the context.

(Bitbake rev: ae87f5b8bf16191b3201cfb445062938eab992a0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie 95be16f428 bitbake: data_smart: Move override handling to getVar
Compeltely remove the replaces functionality and move all overrides
handling to getVar time. We can move the cookie cache into a hidden
flag within the variables themselves.

This removes the need for any of the internal_finalize steps.

This obsolete the need for the _seen_overrides COW cache.

(Bitbake rev: 2a0b73110bede91777ada54d1d89b45fb6034b6c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie 7fc6f6c98d bitbake: data_smart: Cache overrides and fix data store
Rather than repeatedly expanding the value of OVERRIDES, cache
the value and update it when things change.

There were also some bugs introduced in the replaces functionality
which this approach fixes by ensuring the replaces data is updated
at the correct points.

(Bitbake rev: f3b7c3e054ce230ea5c2db5813390383e8dfd6db)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie 35a6f7d21f bitbake: data_smart: Fix cache clearance problems
These write operations should clear the expand cache since they can
influence returned variable values but currently do not. Fix this.

(Bitbake rev: a075332c9e13be35f1ae84adc6b29e9137a487ff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie 577f160400 bitbake: data_smart: Improve override handling
Rather than the heavy lifting in internal_finalize, move the bulk of
the functionality to getVar and rely on a new internal replaces variable
to keep track of any mappings that are needed. This removes the need
for the COW _special_values cache.

This change in functionality also implies we need to track any changes
not only to OVERRIDES but also any variable which OVERIDES depends upon.
Add code to handle this.

Explicitly list FILE as a value OVERRIDES depends upon since it doesn't
automatically get detected and is of key importance to OVERRIDES,
otherwise PN doesn't update when FILE changes.

(Bitbake rev: a6f1377ce3386d274882072d1ae6da3b1834149b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:45 +01:00
Richard Purdie e7ccd90712 bitbake: data_smart: Remove need for update_data calls
Move the update_data functionality into internal data store operations
so the main finalize (update_data) call is a nop.

To make this work we need to call the internal finalization function
whenever OVERRIDES is changed to ensure values get updated correctly.

This has performance issues but the subsequant patches look into this.

(Bitbake rev: 546d9932d6c4413824319a9d780c0d77d2725f4a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:44 +01:00
Richard Purdie 42a59961fa bitbake: data_smart: Defer append/prepend handling
(Bitbake rev: b1ce9975ef96f2506042832f4518cde73f6be917)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:44 +01:00
Aníbal Limón 5ae52eec3a bitbake: fetch2/wget.py: checkstatus disable SSL cert validation.
Since Python 2.7.9 ssl cert validation is enabled by default
see PEP-0476, this causes verification errors on some https
servers so disable by default.

(Bitbake rev: e177170200ece76b36e3f7d5597651fdef67736f)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:44 +01:00
Aníbal Limón 73b9cd9764 bitbake: tests/fetch.py: FetchCheckStatusTest add cases for ftp and https.
(Bitbake rev: 36f2577d075f87090766877473f9030e44a941a2)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:43 +01:00
Aníbal Limón 804f1a2312 bitbake: fetch2/wget.py: checkstatus fix using proxy handler
Only use ProxyHandler opener when exists proxies in env.

(Bitbake rev: 0f062c5d99e12ce20c0e46a8e602448032144ff6)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:43 +01:00
Aníbal Limón 913631c466 bitbake: tests/fetch.py: Add FetchCheckStatusTest tests.
Add tests for checkstatus method using http with/without
connection cache.

[YOCTO #7796]

(Bitbake rev: b1f2d3edefb7dd274174eb983666213b0f49c994)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:42 +01:00
Aníbal Limón 3b186fba59 bitbake: fetch2/wget.py: Add support of connection cache in checkstatus.
fetch2/__init__.py: Add connection_cache param in Fetch __init__.

In order to pass connection cache object to checkstatus method.

[YOCTO #7796]

(Bitbake rev: 9fa6407e6cefe66c77467419a8040d6957a6bb01)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:42 +01:00
Olof Johansson 97c5ecffaa bitbake: fetch2/sftp: Set BatchMode=yes as argument to sftp
Set BatchMode=yes instead of PasswordAuthentication=no. This will make
sftp fail immediately, not only when SSH requires interactive
authentication, but also on errors related to host key verifcation.

(Bitbake rev: 31305853a177735cc9c4553ea8905cd0acfcb100)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:41 +01:00
Robert Yang 518abb731c bitbake: git.py: create a branch when checkout
* Create a branch and named as upstream branch when checkout source
* Set the branch to track remote branch.

(Bitbake rev: 1ba20e4fe9c884515b200589fe379ad5eeda10bd)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:41 +01:00
Richard Purdie 61fbff2cd4 bitbake: cooker/taskdata: Make NoProvider errors non-fatal to -e/-g options
If you have a situation where you are getting a "Nothing PROVIDES" error
(for example when something you request to build DEPENDS on something
that has been skipped or doesn't exist) it would be useful to be able to
use bitbake -g or bitbake -e to debug it, but currently both of those
are blocked by the error.

This patch adds an "allowincomplete" option to taskdata and uses this
for the -e/-g bitbake options. The NoProvider errors are still
printed and bitbake does return an error exist code but the environment
and task graph files are generated.

[YOCTO #7623]

(Bitbake rev: 2ca36a9f088438a8d1db44119c704f9480b04298)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:41 +01:00
Richard Purdie 625a6bf6e8 bitbake: prserv/db: Document history modes
I keep having to dig into the archives to remember this information.
Add it as a comment to the file instead.

(Bitbake rev: 21dce82056887d8d28edde61b1b82f78bdf7613c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:40 +01:00
Paul Eggleton 3b50312307 bitbake: lib/bb: set up infrastructure for shell message functions
Create a fifo under ${T} for each running task that can be used by the
task to send events back to BitBake. The purpose of this is to allow
OpenEmbedded's logging.bbclass (which provides shell function
equivalents for bb.warn(), bb.note() etc.) to have those functions
trigger the appropriate events within BitBake so that messages are shown
through the BitBake UI rather than just in the task log; to do that we
just call the python functions.

Part of the fix for [YOCTO #5275].

(Bitbake rev: bae330a1f8a59a912eca71177b3c6ba7c92a2f38)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:50:40 +01:00
Aníbal Limón f9ea480e6c bitbake: fetch2: Add fetch parameter to checkstatus
In order to pass connection cache object to checkstatus function
add fetch parameter.

(Bitbake rev: fbb9c6f5538084e125b58118a86968908e6f895b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:21 +01:00
Aníbal Limón bf6c21c38b bitbake: fetch2/__init__.py: Add FetchConnectionCache class
FetchConnectionCache class acts as a container for socket connections
useful when implement connection cache into fetcher modules.

(Bitbake rev: 454da2cd17539ceb9caad6d76f034757e44ee12f)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:21 +01:00
Leonardo Sandoval 3b5b74b430 bitbake: knotty.py: Make sure bitbake.lock is unlocked before exiting
Before exiting the UI, unlocks the bitbake.lock owned by cooker; this
way consecutive bitbake executions can lock it again without trouble.

[Yocto #7941]

(Bitbake rev: 69ecd15aece54753154950c55d7af42f85ad8606)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:21 +01:00
Leonardo Sandoval 67eaefee29 bitbake: command.py: Unlock function included into CommandsSync class
Function which calls cooker's unlock method, which in turn unlocks bitbake.lock
file.

(Bitbake rev: e97a9f1528d77503b5c93e48e3de9933fbb9f3cd)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:21 +01:00
Leonardo Sandoval 7bccf59a24 bitbake: cooker.py: Lock/Unlock members function into BBCooker
(Bitbake rev: d66dccf9f9a33bfef5c28cc1c767bfc89faee532)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:21 +01:00
Richard Purdie 25702f3a2f bitbake: cooker: Improve DATE/TIME handling
Currently, once set, DATE and TIME in the metadata remain unchanged.
This is suboptimal for cases where cooker is reused. This ties setting
the variables into the BuildStarted event which seems like a more
appropriate time to do so.

It also changes BUILDNAME to be based off DATE/TIME by default if not
already set so that the data is more consistent. We therefore need to
expand the value rather than the previous default of not doing so.

This change does mean the date/time values are in sync across all
variables too.

It does mean bitbake now has special knowledge of DATE/TIME but that
would seen unavoidable (other than doing this in event handlers which
has its own set of downsides).

[YOCTO #5187]

(Bitbake rev: f883cf240266ee7be2cbd8971a8164cf4df9e372)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:06:08 +01:00