Commit Graph

2440 Commits

Author SHA1 Message Date
Richard Purdie 697f74988a bitbake: Drop bitbake-runtask (removed upstream a while ago)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04 11:54:23 +01:00
Andrei Dinu ea281d3b8e bitbake: Added distroy signal to information dialogs
Added distroy signal to information dialogs
so that when pressing the close button,
the dialog would close.

[HOB #4568]

(Bitbake rev: 265e27857d1d8914486b924d3390bfbe88f4e39b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-31 08:25:40 +01:00
Mark Hatle b5255bb34d bitbake: lib/bb/cache.py: Change debugging note to a debug message
Some apparently debugging was left in in a previous commit.  This caused
bitbake to return a list of bbappends when things changed from the cache.

Make this a proper debug message.

(Bitbake rev: 1965e5cbdfede18d7b7cb0218e0a5147c3f1c884)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-31 08:25:40 +01:00
Richard Purdie 9da832146b bitbake: prserv: Unbreak after bb.server changes
(Bitbake rev: e2cc22fb8b2e97b068b6037540c746ecb1856de6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 18:05:57 +01:00
Richard Purdie eeac1e9dfd bitbake: cookerdata: Fix tinfoil by adding missinge extra_caches default
(Bitbake rev: d513153cac283aa4ec37135a9190f7a091b6c44b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 16:42:34 +01:00
Alexandru DAMIAN d0861b7a12 bitbake: bitbake: xmlrpc remote server
Added code in XMLRPC server that creates a stub local server
for a client-only connection and is able to connect to
a remote server, and receive events from the remote server.

Added the option to start a client with a remote server in
bitbake.

Original code by Bogdan Marinescu <bogdan.a.marinescu@intel.com>

(Bitbake rev: 25b2af76104d5aaf6435de8c158e0407512f97ce)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 10:44:00 +01:00
Alexandru DAMIAN 0fc3a1eddf bitbake: bitbake: xmlrpc transport has identification token
In order to be able to identify different clients over a
stateless XMLRPC connection, we add a custom header named
Bitbake-token, which identifies each client.

We refactor the rest of the code to use the new transport.

Based on a patch by Bogdan Marinescu <bogdan.a.marinescu@intel.com>

(Bitbake rev: a00c2186bffe848a7cedf31969b904f8f7322ae6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 10:44:00 +01:00
Alexandru DAMIAN b6b30095de bitbake: bitbake: move start server code in a separate function
This is a code sanitization targeted at making further
server-related changes easier (launch a server
separately or creating a mockup-server) to do.

(Bitbake rev: eac00258d213137ef73aed255c92b7981e2f1c75)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 10:20:32 +01:00
Alexandru DAMIAN e6a1b33bc8 bitbake: bitbake: move extra cache collection out of cooker
The collection of the extra caching data should not
be performed by the cooker, but supplied to it.
This patch will also streamline the code for launching servers
without a UI attached.

Based on a patch by Bogdan Marinescu <bogdan.a.marinescu@intel.com>

(Bitbake rev: f0b54280a6bce522508e4741e5f507bc284113a8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 10:20:32 +01:00
Alexandru DAMIAN e09a159277 bitbake: bitbake: retrieve the entire ui module in launcher
Slight change in bitbake as to retrieve the entire UI module
for further processing instead of just the main function.

Based on a patch by Bogdan Marinescu <bogdan.a.marinescu@intel.com>

(Bitbake rev: f49341a9599d971829ef65b2b02732543740a3c9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 10:20:31 +01:00
Richard Purdie 52d05125c1 bitbake: fetch2: Fix missing function call
Fix the issue:

File: '/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/build-appliance/build/bitbake/lib/bb/fetch2/__init__.py', lineno: 813, function: try_mirror_url
     0809:    except bb.fetch2.BBFetchException as e:
     0810:        if isinstance(e, ChecksumError):
     0811:            logger.warn("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (newuri, origud.url))
     0812:            logger.warn(str(e))
 *** 0813:            self.rename_bad_checksum(ud, e.checksum)
     0814:        elif isinstance(e, NoChecksumError):
     0815:            raise
     0816:        else:
     0817:            logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
Exception: NameError: global name 'self' is not defined

(Bitbake rev: 5f960017bb1d4274a5bd5b598971f38c12fc0f11)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 09:54:35 +01:00
Richard Purdie 3fb25ef24b bitbake: server/bitbake: Remove launchUI method
With the removal of the none server type, we can remove the launchUI
method and simplify the code slightly.

(Bitbake rev: 9bef2f2dd0bcaa59528ebcb3c1ce053b7dff1ec6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 09:54:35 +01:00
Richard Purdie e118ee3ad8 bitbake: server: Remove none server
The process server backend has been serving well as the default for a long
time now and the UI model is much better thought out that it used to be. With
the move to make bitbake a memory resident process, the none server is now
looking rather pointless and complicates the code needlessly. Lets therefore
now remove it.

(Bitbake rev: 9af03a89605e3db9bce3cea1e0f2d0b6cfaa6fe1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 09:54:34 +01:00
Richard Purdie fe715c4d1b bitbake: cooker/cookerdata: Fix up event handling for hob
The init function call was clobbering data hob relies on injecting, fix
this so the data injected by hob isn't overwritten.

(Bitbake rev: 64ca1aa1fd5f0473196b6cd805637fa644a92173)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 13:57:40 +01:00
Richard Purdie 3b4b782e07 bitbake: build: Avoid empty promises
The "see xxx for further information" is misleading since it is just
the same information. Clarify just to mention the that this is the location
of the logfile without any empty promise.

[YOCTO #4343]

(Bitbake rev: 7088c0e8553dd3c408b5bc06f8c34d5b72e9ea9a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 11:30:35 +01:00
Paul Eggleton 72accaf7d9 bitbake: bitbake-layers: fix show-appends and flatten for recent cooker changes
Fixes the show-appends and flatten subcommands for recent refactoring in
cooker.

[YOCTO #4536]
[YOCTO #4535]

(Bitbake rev: 54817d0de667941ee68fe3490684159e2d90e9c5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 11:24:01 +01:00
Richard Purdie fa4b1fa257 bitbake: cooker/cookerdata: Improve configuration object handling
Originally it seemed like a good idea to keep the parameters around. Having
seen this in real life use, its incorrect, we should pull all the data we need
into the cooker's configuguration and then use this to build the datastore.

Being able to just build the datastore from the parameters seemed like a good
idea but having a dummy cooker configuration object is now looking like
the better option.

This also fixes failures in hob since the parseFiles command can call
into cooker directly now and reset the configuration prefiles and postfiles
at will, rather than the indirect calls before which were breaking the datastore
(e.g. BBPATH wasn't set).

The cleanup this allows in tinfoil illustrates how this change makes more sense.

(Bitbake rev: f50df5b891bf318f12fc61c74adfcc626cc6f836)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:53 +01:00
Richard Purdie 7cf87fc083 bitbake: fetch2: Fix missing assignment
The assignment to True was missing from the code, well spotted Saul!

(Bitbake rev: e493fe8cb4953935f01361ffc0240e5818ebb283)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:53 +01:00
Richard Purdie 507d5cc2cc bitbake: cooker/cookerdata/event: Improve class handlers management
Similarly to the execution context changes, establish better lifetime
management API of the class event handlers.

(Bitbake rev: 54e35a6cceead9521f8b1dacd48e55064e85c8bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:53 +01:00
Richard Purdie ea34691791 bitbake: cooker/cookerdata/utils: Improve context management
The current execution context management for bitbake is ugly and the
use of a global variable is nasty. Fixing that is hard, however we
can improve things to start to establish an API for accessing
and changing that context.

This patch also adds in an explicit reset of the context when we reparse
the configuration data which starts to improve the lifecycle of the data
in setups like hob.

(Bitbake rev: 6c3281a140125337fc75783973485e16785d05a1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:52 +01:00
Richard Purdie b9bd05b672 bitbake: event: Drop Handled/NotHandled status return values
These have long since been deprecated, lets remove them.

(Bitbake rev: 3dc83bbb1bf387bb7ecea2e17f0f72cfccecba92)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:52 +01:00
Richard Purdie 0130b4c269 bitbake: cooker.py: Remove global scope class event handlers
Its confusing when an event handler in for example a bbclass receives
events for a recipe which doesn't use the class. This is due to the
class event handlers having confusing scope. Worse, the issue is not
deterministic and the events a handler will see depends on the parse
order.

To avoid these issues, remove the class event handler global scope
and only have class handlers recieve events for recipes using the
class.

(Bitbake rev: 7fb95f3d133e440d463d2faa7151c731f8e1ae96)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:52 +01:00
Richard Purdie 8bef99d3c8 bitbake: methodpool: Retire it, remove global method scope
Having a global method scope confuses users and with the introduction
of parallel parsing, its not even possible to correctly detect conflicting
functions. Rather than try and fix that, its simpler to retire the global
method scope and restrict functions to those locations they're defined
within. This is more what users actually expect too.

If we remove the global function scope, the need for methodpool is reduced
to the point we may as well retire it. There is some small loss of caching
of parsed functions but timing measurements so the impact to be neglibile
in the overall parsing time.

(Bitbake rev: 4d50690489ee8dc329a9b0c7bc4ceb29b71e95e9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:52 +01:00
Richard Purdie 3c5b9cf15f bitbake: methodpool: Conflicting methodnames should be a fatal error
When this error occurs, the build should stop, not continue uninterrupted.

[YOCTO #4460]

(Bitbake rev: acd6d7ffa8813b3b11cad9145e8e614a695ae04a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 10:34:51 +01:00
Cristiana Voicu 3216f00f86 bitbake: hob: Table sorting criteria should not change after deselecting recipes/packages
After a recipe/package is deselected, the table is sorted as before the
fadeout animation.

[YOCTO #4453]
(Bitbake rev: d4968eac539f777367ab1243a1049117cb261176)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:25:11 +01:00
Cristiana Voicu da34a8db49 bitbake: hob: apply a fade out animation when deselecting from tables
-applied a fade out mechanism for deselctiong on all the tabs of
recipes and packages list page
-set cursor on the package/recipe when it is included(important
when the its place is changing; like when the tree si order by
included tab)

[YOCTO #4342]
(Bitbake rev: 8bd0e0681a6a39c00accbfc0041ab248993f3877)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:25:10 +01:00
Paul Eggleton 25182cd849 bitbake: cookerdata: rename _parse to parse_config_file
We use this externally in the OE layer index update script, so it
shouldn't really be named as an internal function.

(Bitbake rev: 89332a7874e94c8d91ea24200f9739abb1a50397)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:25:10 +01:00
Paul Eggleton a4bf49052b bitbake: tinfoil: fix for changes to cooker config structure
Fix the code here for recent changes to the initialisation of
configuration objects for cooker.

(Bitbake rev: 9d3ca9aa73a448b0594f03ac8e8317403ec0dc8d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:25:10 +01:00
Paul Eggleton 25905ae637 bitbake: bitbake-layers: fix for move of calc_bbfile_priority within cooker
calc_bbfile_priority is now in CookerCollectFiles which can be accessed
on the collection attribute of a cooker instance.

Fixes [YOCTO #4513].

(Bitbake rev: 5d941631ad7198737d9a5c5a920a9062fa0431f8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:25:10 +01:00
Richard Purdie 49f127827d bitbake: command: Fix function module reference after code rearrangement
(Bitbake rev: ff9f62fd5f76892ad41a5329b75472501e17e712)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 16:21:56 +01:00
Richard Purdie 0c0bb02f51 bitbake: runqueue.py: Ensure export flag is set for fakeroot environment variables
This means the variables show up in the shell execution "run" files since
its useful to know what the fakeroot environment is and how to set it up
manually.

(Bitbake rev: bdf437747b664479acde6deaa9096e2a6bcdf483)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:14 +01:00
Richard Purdie ba707d0ffa bitbake: bitbake/cookerdata: Explicitly specify cooker configuration options
As the code stands today its hard to know which configuration variables
are used by which parts of the system. Some are used by the UIs, some
by bin/bitbake itself, some by cooker.

This patch changes the configuration to just contain the variables cooker
uses, and changes bin/bitbake to access the variables it needs directly
which hopefully lets us start to untangle this mess.

(Bitbake rev: e57497a24b6157c92519a34accd66035a39ad1f8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:14 +01:00
Richard Purdie 26d19996a3 bitbake: cooker: Split configuration parsing code into cookerdata
In order to have a memory resident bitbake and to allow task execution, we need
to be able to rebuild the base configuration without a cooker. This moves the
code into its own class so it can be built independently.

The interface is less than ideal here but I didn't want to add parsing methods
a subclassed DataSmart, at least until we've experimented further with this code
and are certain that makes sense. At the very least, the methods are ugly and need
cleaning up.  Spliting the code out seems to be the right thing to do though and
should unblock various activities on BitBake so I believe this code is a step in
the right direction.

Based on a patch from Alexandru Damian <alexandru.damian@intel.com>

(Bitbake rev: 22a0b3cf73d2689db0c118b37aa7492632f8b0a7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:14 +01:00
Richard Purdie f0930c8d63 bitbake: cooker: Move commandline parsing back into the UI/cookerdata
Building up a set of actions for the server is tricky since we depend upon the
commandline but fall back to values from the datastore. We should be able to build
a datastore without a commandline and vice versa. Ultimately the UI should send
the commands to the server.

This patch amounts to code rearranging, moving the heavy lifting to the UI, though
a helper in the configuration option. This will need further cleanup/tweaking but
this should be the only update needed to the UIs. The code now queries the server
for any missing data should it need to.

This code allows various knowledge of configuration variables to move to the UI side
only, partcularly pkgs_to_build but also all the command specifiers. It should also
be possible to move cmd eventually, I'm just unsure if any callers call the commands
expecting this to default to something sane right now.

(Bitbake rev: 2dbbb1d51dafd4451fef8fe16f095bcd4b8f1177)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:13 +01:00
Richard Purdie f242f5060b bitbake: bitbake: Create cookerdata splitting config from cooker and bin/bitbake
Currently the UI and server configuration is one big incestuous mess. To
start to untangle this we creater cookerdata, a new module which contains
various confiuration modules and the code for building the base datastore.

To start with we add a ConfigParameters() class which contains information
about both the commandline configuration and the original environment.

The CookerConfiguration class is created to contain the cooker.configuration
options. This means we can transfer new paramters to the server over something
like XMLRPC and then build a new configuration from these on the server.

Based on a patch from Alexandru Damian <alexandru.damian@intel.com>

(Bitbake rev: 35bd5997e8d8e74bc36019030cc10c560a8134f9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:13 +01:00
Richard Purdie 308ae92100 bitbake: bin/bitbake: Improve exception handling
Due to the internal event processing, this excepting handler usually raises an
Empty error, masking the underlying failure. Ensure the original exception is
raised.

(Bitbake rev: 7d548568a55adfe84a976f2a549995e42da1afef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:13 +01:00
Richard Purdie 77fc40a0f8 bitbake: fetch2: Shorten long srcrevs
The long srcrevs are mainly used or the workdir construction as well as
the package version. The long entries are hashes generated by the git fetcher
and other scms using a similar revision mechanism.

We need these to change when the package changes however collisions are
unlikely to happen within the domains we care about. The long revisions
have generated negative user feedback due to the use in path and file
names.

This patch therefore truncates the revisions to 10 characters maximum.

This should be safe in the contexts where these revisions are used as
the chances of spatially close collisions is very low (distant
collisions are not a major issue in the way we use these).

(Bitbake rev: 43a8319cda7fae37862dae323eeb24cb39ca21b7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:13 +01:00
Richard Purdie d228f9d938 bitbake: fetch2/git: Clean up sortable_revision
Now we no longer try and provide increasing values from the fetcher,
we can simplify the function structure for the sortable_revision
pieces and move the AUTOINC handling directly into the function
which needs it, simplifying the code.

(Bitbake rev: fb068bee47bb1a06f02447daf16c2b2a79c03288)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:12 +01:00
Richard Purdie 608821349c bitbake: data: Ensure dependencies of subfunctions are accounted for
Currently we account of the top level function's vardeps but not
those of any subfunction. This would imply we'd have to manually
write the dependencies of all parent functions which would be crazy.

This patch adds the dependencies to fix the issue.

(Bitbake rev: 658008cc6a8acd5c1f26877c9444c96002db01e7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-22 12:10:12 +01:00
Richard Purdie 350c36fcd9 bitbake: test/fetch: Allow the conditional network tests to work under python 2.6
The skipIf decorator is unavailable under python 2.6 and finding a syntax
works there is hard. This patch does allow network tests under 2.6.

(Bitbake rev: 565b3e31e0226c6e193ee0b031bd5e7bef25591e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-17 12:42:08 +03:00
Richard Purdie c8ab3b0810 bitbake: test/fetch: Split the network tests from the rest of the fetcher tests
(Bitbake rev: f32265bcc6b4fe5566aca16f6b05555ec6a96d01)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-17 12:42:08 +03:00
Richard Purdie 4d3a53ff36 bitbake: fetch2/utils: Clean up imports
Move various random imports to the start of the modules as cleanup
and avoid an import issue with bb.process on python 2.6.

(Bitbake rev: aed4adfbe3a591ca4f8e41fb763c9f961bf2e6d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-17 12:42:08 +03:00
Richard Purdie 0a52bdfb9a bitbake: tests/fetch: Allow to work on python 2.6
Currently the fetch tests fail on python 2.6 since check_output
doesn't exist on this version of python. Use bb.process instead
to avoid this problem.

(Bitbake rev: a3637155e829e06bbfe50fb8753de3de7ee8c22e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-17 12:42:08 +03:00
Richard Purdie bd27cca7e6 bitbake: bin/bitbake: Fix queue import for pyhton 2 and 3
(Bitbake rev: 782bc0e797802224f06cb6f9098a50d658c86523)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 15:04:18 +03:00
Bogdan Marinescu 4f070506df bitbake: hob: fix for XMLRPC mode
Contains a small fix to the builder.py code
(a missing "self" in a variable assignment).
With this changes, "hob" can run with the XMLRPC backend:

$ hob -t xmlrpc

(Bitbake rev: 3497478f803986af32099ddd124c47df8e89f6da)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-14 14:57:27 +03:00
Richard Purdie 96b428908c bitbake: cooker/bitbake-layers/tinfoil: Fix recipecache typo
(Bitbake rev: 0f5eee689992f84d263cb817dc2ce755a9a075f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-13 21:53:37 +03:00
Richard Purdie f7afeeb759 bitbake: bitbake-layers/tinfoil: Catch up with status -> recpiecache rename
(Bitbake rev: 0a9cbe7a6a17c5df38cd442ee8650097d6bbf502)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 18:00:46 +01:00
Richard Purdie 5ea4d8167d bitbake: cooker: Rename status variable to recipecache
"status" is a relic of very early versions of bitbake, rename it to match what it now
means.

(Bitbake rev: db307fc68773868de2db614a061f51c5c6a90468)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:15 +01:00
Richard Purdie 9ed7cd13fd bitbake: cooker: Rename confusing buildDepgraph task to handlePrefProviders
(Bitbake rev: a25722175bf61f22961f45dbd356cb6d79864b35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:15 +01:00
Richard Purdie 8c7a23ed3f bitbake: cooker: Drop pointless variables
(Bitbake rev: 0d7517db234ef5f6b3eb99822ecb5e86cf48fe2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:15 +01:00
Richard Purdie c035bf9c21 bitbake: cooker.py: Drop confusing updateCache calls
updateCache() gets called by command.py when needed and needs to be iterated
over. The calls in cooker.py are therefore just plain wrong/confusing now.

(Bitbake rev: 8b7c65bba466bb6773c56849074978ce2c956129)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie d8cf6e956f bitbake: cooker: Remove pointless repeated import
(Bitbake rev: e01914a8eaa97a410cb5fe9480f2d96bb6553342)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 06aaf0d0c9 bitbake: cooker: Fix get_bbfiles()
Its clear looking at the code the path argument has never been used and doesn't
work. Tweak the function to be a little more readable.

(Bitbake rev: d7047ceaf29b870ade3257e263e010f65aa8bc6e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 51e54ed8a9 bitbake: cooker: Separate out collections handling code into its own class
The Cooker class is too large and needs to be split up into different
functional units. Splitting out the collections code into its own class
seems like a good place to start to try and disentangle things.

(Bitbake rev: ca1fcbb6e214c155a05328779d3d326e10c5eac0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Richard Purdie 6ebdeb48c4 bitbake: cooker: Drop unused variables from collect_bbfiles()
(Bitbake rev: 67a8e13eed6433bd1e4fab82ece5f6774b42fa00)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-12 08:26:14 +01:00
Olof Johansson 88a7b041fb bitbake: pysh: Say what kind of token isn't implemented
When the shell lexer finds an unrecognized dollar token, the error
message should contain what kind of token it is having problems with.

(Bitbake rev: 1acb9c338018c612db519d2db823c66b567863b9)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:35:10 +01:00
Cristiana Voicu d98419ae70 bitbake: hob: assure consistency for image size label
After the image was build, update the image size in the packagelistpage.

[YOCTO #4388]
(Bitbake rev: 4d6d02e61b32d1d710c708774f08cc5e7764415d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 9c60292b6f bitbake: hob: clicking on "cancel" should reset table sorting to default
Changed the "cancel" callback function for both recipes and packages
list page.

[YOCTO #4333]
(Bitbake rev: 05ebbaa2426716c6254c4a98872020d02d2944bd)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 24f060805f bitbake: hob: "Brought in by" sorting should take into account the (+#) information
[YOCTO #4332]
(Bitbake rev: 226a5f2d0947460cb6df9e97f0146b65f96a7f8c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Cristiana Voicu 39d3409d31 bitbake: hob: sort alphabetically results in groups of recipes/packages
When you search a string, there are 2 groups: recipes/packages starting
with that string, and the rest. These 2 groups are now sorted.

[YOCTO #4111]
(Bitbake rev: 8d2b2a1c97570d3c6b40727f1afa1db8c00882f9)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:33 +01:00
Andrei Dinu 6dab4d0148 bitbake: Updated information in tooltips
Updated information for "Additional free space" and
"Image basic size" to match the description in the
manual.

[HOB #4354]
[HOB #4355]

(Bitbake rev: d3eac3f104689137c071c91a343ca4558b9d9f17)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 13:33:32 +01:00
Richard Purdie e5d077d57f bitbake: lib: print is a function in moderm python, covert remaining users
(Bitbake rev: d0b180d868390a464b6799ad90db6bbe0350e158)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie 3e86a6cdde bitbake: lib: Use modern expcetion syntax
(Bitbake rev: a4a37b6a83faa62f61433122c4583e93e64f7372)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie a823c88839 bitbake: prserv: Drop StandardError usage
StandardError doesn't exist in python 3, use Exception instead.

(Bitbake rev: 4a40046036493f0cdf0f66487ad5ce083461a5c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:24 +01:00
Richard Purdie 9b913576ea bitbake: siggen: Add missing error message parameter
There is clearly a missing parameter from this error message, add it.

(Bitbake rev: d98be5ea69b99fb7934fc3093422f139bc37a1cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie c6c341a555 bitbake: providers: Remove pointless lambda sort function
This lambda function is equivalent to the default sort used by sorted,
so we can simply remove this. The syntax isn't compatible with python 3.

(Bitbake rev: da8550fc884596222daa3f8794dce1abd01e5612)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 5c3944c0f9 bitbake: cooker: Remove deprecated operator
The <> operator is deprecated, replace with !=.

(Bitbake rev: 4a43e58dd97ec6ea304eaa727c030973a5bc91b7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Richard Purdie 4a081b5a52 bitbake: lib: Clean up various file access syntax
Python 3 is stricter about how files are accessed. Specficially:

 * Use open(), not file()
 * Use binary mode for binary files (when checksumming)
 * Use with statements to ensure files get closed
 * Add missing file close statements

(Bitbake rev: 9f08b901375ba640f47596f1bcf43f98a931550f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 22:28:04 +01:00
Martin Jansa d529c11fa5 bitbake: git: remove symling before updating mirror tarball
* with read-only PREMIRROR (e.g. mounted over NFS or CIFS
  and referenced as file:///mnt/premirror) we cannot use
  BB_GENERATE_MIRROR_TARBALLS because all git2_abc.git.tar.gz
  files later became just symlinks to read-only location in PREMIRROR
  (it works fine on first build and for new components, because
  at that time there isn't tarball on PREMIRROR yet).

  ERROR: Fetcher failure: Fetch command failed with exit code 141, output:
  tar (child): /build/downloads/git2_abc.git.tar.gz: Cannot open: Read-only file system
  tar (child): Error is not recoverable: exiting now

(Bitbake rev: 3627b02f77c78beedadadd77c619b9e5edaae076)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:15:10 +01:00
Paul Eggleton fd8dcd7b88 bitbake: bin/bitbake: add a check for /dev/shm existing
Python multiprocessing needs /dev/shm, and if it doesn't exist (e.g. in
a chroot environment) or is not writable, you'll get
"OSError: [Errno 38] Function not implemented" or
"OSError: [Errno 13] Permission denied" with a traceback, which doesn't
really help to explain what is wrong.

Implements [YOCTO #4407].

(Bitbake rev: e7460d01f281f913a94192e1f4bd20688164bdd4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:14:12 +01:00
Richard Purdie a189ec4ae7 bitbake: utils: Improve better_compile error message
Similarly to the better_exec improvements, improve the compile failure
messages to be more user readable.

(Bitbake rev: 9bc92d0210e13e4cc98727f6c9ec2f47c2221e77)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Richard Purdie bc95ddec6d bitbake: utils: Improve better_exec traceback handling
The current bitbake tracebacks are hard to read/confusing and sometimes
incomplete. This patch attempts to do better by:

* Moving the note about the exact exception to the end to make things
  read in sequence
* Merged the initial stack trace to become part of the code dump
* Added handling for "/xxxx" file paths since we can load these files
  and include the data as part of the trace
* Dropped the ERROR: prefix to every line, allowing the error messages to
  be spacially accosicated in the UIs
* Moved the "From:" line to the top of each code block and ensured its present
  consistently

With the complexity now in this funciton, I've added try/except wrapping around
it to ensure we catch exceptions in the exception handler too.

Example before:

"""
ERROR: Error executing a python function in /media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb:
TypeError: 'filter' object is not subscriptable

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "do_populate_lic", line 13, in <module>
ERROR:
ERROR:   File "do_populate_lic", line 6, in do_populate_lic
ERROR:
ERROR:   File "license.bbclass", line 99, in find_license_files
ERROR:
ERROR:   File "/media/build1/poky/meta/lib/oe/license.py", line 38, in visit_string
ERROR:     if pos > 0 and license_pattern.match(elements[pos-1]):
ERROR:
ERROR: The code that was being executed was:
ERROR:      0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
ERROR:      0010:    copy_license_files(lic_files_paths, destdir)
ERROR:      0011:
ERROR:      0012:
ERROR:  *** 0013:do_populate_lic(d)
ERROR:      0014:
ERROR: [From file: 'do_populate_lic', lineno: 13, function: <module>]
ERROR:      0002:def do_populate_lic(d):
ERROR:      0003:    """
ERROR:      0004:    Populate LICENSE_DIRECTORY with licenses.
ERROR:      0005:    """
ERROR:  *** 0006:    lic_files_paths = find_license_files(d)
ERROR:      0007:
ERROR:      0008:    # The base directory we wrangle licenses to
ERROR:      0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
ERROR:      0010:    copy_license_files(lic_files_paths, destdir)
ERROR: [From file: 'do_populate_lic', lineno: 6, function: do_populate_lic]
ERROR:      0095:        lic_files_paths.append((os.path.basename(path), srclicfile))
ERROR:      0096:
ERROR:      0097:    v = FindVisitor()
ERROR:      0098:    try:
ERROR:  *** 0099:        v.visit_string(license_types)
ERROR:      0100:    except oe.license.InvalidLicense as exc:
ERROR:      0101:        bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
ERROR:      0102:    except SyntaxError:
ERROR:      0103:        bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
ERROR: [From file: 'license.bbclass', lineno: 99, function: find_license_files]
ERROR: Function failed: do_populate_lic
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp/work/i586-poky-linux/eglibc-initial/2.17-r3/temp/log.do_populate_lic.17442
"""

Example after:

"""
ERROR: Error executing a python function in /media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb:

The stack trace of python calls that resulted in this exception/failure was:
File: 'do_populate_lic', lineno: 13, function: <module>
     0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
     0010:    copy_license_files(lic_files_paths, destdir)
     0011:
     0012:
 *** 0013:do_populate_lic(d)
     0014:
File: 'do_populate_lic', lineno: 6, function: do_populate_lic
     0002:def do_populate_lic(d):
     0003:    """
     0004:    Populate LICENSE_DIRECTORY with licenses.
     0005:    """
 *** 0006:    lic_files_paths = find_license_files(d)
     0007:
     0008:    # The base directory we wrangle licenses to
     0009:    destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
     0010:    copy_license_files(lic_files_paths, destdir)
File: 'license.bbclass', lineno: 99, function: find_license_files
     0095:        lic_files_paths.append((os.path.basename(path), srclicfile))
     0096:
     0097:    v = FindVisitor()
     0098:    try:
 *** 0099:        v.visit_string(license_types)
     0100:    except oe.license.InvalidLicense as exc:
     0101:        bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
     0102:    except SyntaxError:
     0103:        bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
File: '/media/build1/poky/meta/lib/oe/license.py', lineno: 38, function: visit_string
     0034:        new_elements = []
     0035:        elements = filter(lambda x: x.strip(), license_operator.split(licensestr))
     0036:        for pos, element in enumerate(elements):
     0037:            if license_pattern.match(element):
 *** 0038:                if pos > 0 and license_pattern.match(elements[pos-1]):
     0039:                    new_elements.append('&')
     0040:                element = '"' + element + '"'
     0041:            elif not license_operator.match(element):
     0042:                raise InvalidLicense(element)
Exception: TypeError: 'filter' object is not subscriptable

ERROR: Function failed: do_populate_lic
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp/work/i586-poky-linux/eglibc-initial/2.17-r3/temp/log.do_populate_lic.3275
ERROR: Task 9 (/media/build1/poky/meta/recipes-core/eglibc/eglibc-initial_2.17.bb, do_populate_lic) failed with exit code '1
"""

(Bitbake rev: c5de66b870406d9bd1161a9b7e2b04fe6eb065fe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Richard Purdie f58e82b9e9 bitbake: bin/bitbake: Ensure early errors are shown to the user
Currently if errors occur early in the init process, the errors may
not be shown to the user. This change ensures that if a failure does
occur, the messages are flushed from the queue and shown to the user.

(Bitbake rev: fda84c4285e0bc31c249b6dd5464aeb6ad622a9a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:52 +01:00
Vanveerdeghem, Simon 67ed18e656 bitbake: fetch2/svn: Do not save authentication
(Bitbake rev: a9b1e7c2ad13ff47acb629bae082d4f96e174f99)

Signed-off-by: Simon Vanveerdeghem <simon.vanveerdeghem@barco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Bogdan Marinescu 7709342e69 bitbake: bitbake: remove stack trace depth limitation
In case of an error in bitbake, the stack trace is limited to 5
items. This is an endless source of confusion and it makes bugs
reports impractical, since a full stack trace can't be included
in the bug report. This patch simply removes the depth limit.

(Bitbake rev: 02629c42fb09413d9da16cfe43e03338ce7db3ff)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Laurentiu Palcu 6db2025321 bitbake: data_smart.py: add some internal bitbake variables to configuration hash
Take __BBTASKS, __BBHANDLERS and __BBANONFUNCS into account when
computing the configuration hash.

[YOCTO #4447]

(Bitbake rev: 260ced7452405fc43ce3d9dd6798236aa07cc716)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Richard Purdie a4cc40c622 bitbake: prserv/cooker: Handle PRService errors cleanly
Current if the PR Service fails to start, bitbake carries on regardless or
hangs with no error message. This adds an exception and then handles it correctly
so the UIs correctly handle the error and exit cleanly.

[YOCTO #4010]

(Bitbake rev: 949c01228a977c3b92bfc0802f6c71b40d8e05b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Martin Donnelly 8779ebcc90 bitbake: goggle: fix invalid error check
runCommand was returning 'error' but checking for 'err'
resulting in an exception.

(Bitbake rev: 263aa44ed47e0cb03e1a97e7ed4a50bd9f828c78)

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:13 +01:00
Richard Purdie c88bfe215f bitbake: Update to version 1.19.0 for master
(Bitbake rev: c47088a86fd8ad06c1810d04d9537c4cd01e8bef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-03 16:24:05 +01:00
Paul Eggleton 9bbf6f350d bitbake: data: fix performance regression
BitBake commit 7c568132c54a21161de28907159f902462f1e2bb resulted in a
fairly serious performance regression during parsing, almost doubling
the time taken to do a full parse and almost certainly impacting
performance during building. The expandKeys function is called
frequently, and if we avoid using keys() and instead just use the normal
variable lookup mechanism, performance is restored.

(Bitbake rev: 034b392e9877309f15940b258fc2c16f16fb40b5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Martin Jansa 07e83d04ac bitbake: fetch2: rename file with bad checksum instead of removing it completely
* this can be useful when someone wan't to compare old file with
  bad checksum and new one

(Bitbake rev: 33c6b93597dd43ab03ce7b62ba3eeb1893a68c38)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Cristiana Voicu 3cc69d3413 bitbake: hob: Refine sorting mechanisms in Hob
-refine sorting functions for each column from recipe list page
and package list page
-sort correctly size column from packages list page
-set default sroting order and secondary sorting criteria
-make included on included recipes/packages no sortable

[YOCTO #2346 & #4194]
(Bitbake rev: 56822176e3d5e613654a46c983d2f979d7a9eebc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Robert Yang 612c25c597 bitbake: monitordisk.py: disable inode checking for btrfs
The btrfs doesn't have static inode, so disable the inode check for it,
the previouse patch has set it:

minInode = None

But this is incorrect, the minInode is just a temporary variable, it
should be:

self.devDict[k][2] = None

[YOCTO #3609]

(Bitbake rev: 7e45149c292bc92314af9b42962fde8f603a179f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:31 +01:00
Richard Purdie ca6321fff4 bitbake: Update to version 1.18.0
(Bitbake rev: 94b54788cadabf6ebfb7711674646dbea6204805)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:17:22 +01:00
Mark Hatle 05d4f94c25 bitbake: data.py: Add a warning when expandKeys overwrites an existing key
When two variables are defined as:

${var} = "bar"
foo = "foobar"

The value of 'foo' when ${var} == foo becomes indeterminate.  We
want to warn a user when this situation has been encountered so they
can take corrective actions.

In the above example usually foo == bar, unless multilibs are enabled.
Then ml-foo = "ml-foobar".

(Bitbake rev: 7c568132c54a21161de28907159f902462f1e2bb)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 13:06:44 +01:00
Ioana Grigoropol 1b93e2bc91 bitbake: hob:Only display scrolled list of images if needed
- do not set the Images window to always display a scroll bar if it is not needed

[Yocto #4171]
(Bitbake rev: 970e2e6f079fa9a49646f86364eae9a4ee241f90)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 09:23:18 +01:00
Cristian Iorga 4330e152ab bitbake: bitbake:hob: use a socks proxy mechanism for git
Instead of a custom git proxy mechanism, Hob now
uses a SOCKS proxy in order to work with external
repos via the oe-git-proxy helper script.

Fixes [YOCTO #4187]

(Bitbake rev: 0b81a2c4a5611b64dbdd40131730a82c149b94a2)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Cristian Iorga <ubik3000@gmail.com>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 09:23:18 +01:00
Andrei Dinu ef0ef862c1 bitbake: propertydialog adjustments for package.bbclass
After moving the code from packageinfo.bbclass to
package.bbclass, minor adjustments were made to the
parsing of the package items.

(Bitbake rev: 414fe98fe367ba44ea0fd20d8fe1296bcef58ea6)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 14:10:56 +01:00
Cristiana Voicu 0d47a7d8e8 bitbake: hob: giving focus to the search field loses the table sorting
Giving focus to the search text field should not impact the table
sorting.

[YOCTO #4113]
(Bitbake rev: b5b4b6e4fefa6a164a49b291a0993b1ff63947f4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Cristiana Voicu b5b1592dd3 bitbake: hob: add tooltip on "clear search" button
[YOCTO #4116]
(Bitbake rev: 3c1b63cf49bdbffef0728fc83bd5a35bc16fd3dc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Andrei Dinu 19ebf1debe bitbake: Removed popup when including a package
Fixed the functionality which made an information
dialog pop up when including any package.

[HOB #4138]

(Bitbake rev: 6cabbb241ab3959b3c8f084423469c0bfc9899bd)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-02 17:57:07 +01:00
Olof Johansson 911dbbd8ee bitbake: bb.tests.fetch: Opt-out for unittests that require network
With this change, you can opt-out to skip unit tests that require an
internet connection. To opt-out, you'll set the environment variable
BB_SKIP_NETTESTS to 'yes'.

(Bitbake rev: 9ff5f172096a4f51b6b085307506473405dc4f59)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:45:17 +00:00
Cristiana Voicu 2f4fe1ee11 bitbake: hob: Search strings and results should be persistent
Now, the search results stay until I clear the search field,
so that I can manipulate the search results.

[YOCTO #4112 & #4117]
(Bitbake rev: d880ce966ca825aa66a23755fcb47497fb3f26c3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:25 +00:00
Andrei Dinu e98716fc92 bitbake: packageselectionpage.py : added information to hob
In order to have information for each package in hob,
a new item is added to the dictionary, represeting the
files that are brought in by each package.

(Bitbake rev: ffb8e32166d0ab690131e753f91592011c3f7ffb)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:25 +00:00
Andrei Dinu 026914ea4c bitbake: hoblistmodel.py : passing the package information to hob
Added a new column to the model and also populating
it with the information brought in from the
packageinfo.bbclass.

(Bitbake rev: afa78ae15be3e0babadd5d86092a2852135cfcce)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu d08acf97c9 bitbake: propertydialog.py : added 'Package files' functionality
Extended the packages page information with the
listing of the files brought in by every package.

(Bitbake rev: 42b1ce37b5c9a357108afdc01b0e9f008a84e6e3)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu 6d9f418a6e bitbake: cooker.py : added variables related to cache_extra
So that the information added to cache_extra could
be accesed by hob, new variables were added in
the cooker.py.

(Bitbake rev: f2d5f4ca9ac82599c74838844f7e54e481e023d3)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Andrei Dinu 43a3a4b5da bitbake: cache_extra.py : added package information
Added a new variable to cache_extra so that
the files brought in by a package can be
displayed in hob.

(Bitbake rev: 94e2f899457d6565442a933529dd3db261ab12f0)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-29 10:41:24 +00:00
Richard Purdie a6c6a8ddb6 bitbake: bitbake/fetch: Add git submodules fetcher
This adds very basic git submodule support to the fetcher. It can be
used by replacing a git:// url prefix with a gitsm:// prefix, otherwise
behaviour is the same as the git fetcher. Whilst this code should be
functional, its not as efficient as the usual git fetcher due to the
need to checkout the tree to fetch/update the submodule information. git
doesn't support submodule operations on the bare clones the standard git
fetcher uses which is also problematic.

This code does however give a starting point to people wanting to use
submodules.

(Bitbake rev: 25e0b0bc50114f1fbf955de23cc0c96f5f7a41e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 15:58:31 +00:00
Richard Purdie 8054716544 bitbake: doc/bitbake.1: Update with missing parameters
Patch from Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> to
add missing parameters to bitbake man page. Added hob to ui list too.

[YCOTO #4049]

(Bitbake rev: ca7cd6c1318e0ef066f9e12e7516a47b2af3a7d1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-25 15:58:31 +00:00
Andrei Dinu cd4f88e0ea bitbake: Adjust spacing on information windows
[Hob #4070]

- tweaked the spacing on info windows

- fixed text bolding in simple settings dialog

(Bitbake rev: 2ecb102968cdbbdbbfa91e1dcccf45bcd0b59a89)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:39 +00:00
Cristiana Voicu 860f826753 bitbake: hob: implementation of search functionality in Hob
Implemented the search functionality for recipes and packages using
filters on the listmodel. I have used the design which can be found in
bugzilla.

[YOCTO #3529]
(Bitbake rev: b77166ad7b8571895f73a84f7789d93fbd4f6d04)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:39 +00:00
Cristiana Voicu ab7d8bd172 bitbake: hob: Hob custom image build error
For a custom image from scratch, the image version is not set and
it gives an error.

[YOCTO #4065]
(Bitbake rev: 43703f3eb5f71a117e6315fa5df91711653636a3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-22 16:54:38 +00:00
Martin Jansa 0ff4529c64 bitbake: runqueue: Use taskData.fn_index[depdata] instead of uninitialized dep
* dep variable was removed in
  commit 3190cb83e2af195a464f669c5aa8aedbf795160e
  Author: Richard Purdie <richard.purdie@linuxfoundation.org>
  Date:   Wed Jun 27 11:04:06 2012 +0100

    taskdata: Add gettask_id_fromfnid helper function

    This is like gettask_id but doesn't require translation of fnid -> fn
    first which the function then translates back. This gives a sizeable
    performance improvement since a significant number of lookups are avoided.

* now it fails completely instead of showing which task is missing

(Bitbake rev: 58847fabd389e5b8d02d5a9c6827aabedb30312f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 20:58:11 +00:00
Cristiana Voicu b844a4292b bitbake: hob: some settings in Hob are not remembered
Some settings in Hob were not saved in Bitbake and they were not displayed
correcty in Hob, because Hob used some other variables with the extension "_HOB".
I have removed this, in order to have a consistency for the variables.
ALso, I called a function to load the extra variables saved in .hob/template_default.hob.

[YOCTO #3957]
(Bitbake rev: 0f62a12ef3fa4daf8f3a289c984115302b75c23d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 20:58:11 +00:00
Robert Yang ee416ad6f4 bitbake: utils.py: fix BB_ENV_WHITELIST
The BB_ENV_WHITELIST doesn't work well and flushes BB_ENV_EXTRAWHITE,
here is an example:

$ export BB_ENV_WHITELIST

$ export BB_NUMBER_THREADS=10 (or other value)

Edit conf/local.conf, change "BB_NUMBER_THREADS =" to "BB_NUMBER_THREADS ?="

$ bitbake -e | grep '^BB_NUMBER_THREADS ='
we will notice that BB_NUMBER_THREADS' value doesn't change, though
BB_NUMBER_THREADS in both BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE.

This is because the "approved" inside the function approved_variables
doesn't include BB_ENV_WHITELIST or BB_ENV_EXTRAWHITE when
BB_ENV_WHITELIST is set (they are incuded by preserved_envvars()), so
the BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE will be removed from the env
in the first call from bin/bitbake, and when it is called again by
cooker.py, their value will be None, then the vars inside them will be
removed from the env.

Add BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE to the "approved" would fix
the problem.

[YOCTO #4031]

(Bitbake rev: d2b07e6516dd308d0045a7fdb72b588af9d676ad)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:56:03 +00:00
Robert Yang af9f5843d9 bitbake: monitordisk.py: monitor disks based on path
The previous monitor is based on the disk, and one disk only can have
one action, this limits its function, for example we set this in the
current local.conf:

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100GM,1K"

Before:
  * If TMPDIR, DL_DIR and SSTATE_DIR are on the same disk partition,
    only the last line "ABORT,${SSTATE_DIR},100GM,1K" works

  * If TMPDIR, DL_DIR and SSTATE_DIR are on the different disk partitions,
    only the last three lines (ABORT) work.

These are not what we expect, now:
  * We monitor the disk based on the path and action, so all the six lines
    will work no matter whether they are on the same disk partition or
    not.

  * The out put format will be:
    WARNING: The free space of /path/to/directory (device) is running low (XXGB left)

[YOCTO #3995]

(Bitbake rev: e22a576672ee4a40b44f7a826a78a77fc07e9177)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:55:38 +00:00
Andrei Dinu 37bfbd6493 bitbake: crumbs/recipeselectionpage: added events for the "Package Groups" "All recipes
" tabs and passing the information needed to the function created
in the builder.

(Bitbake rev: 60c3b561d66f9a43e696c402899141287ddb496e)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 58115affd1 bitbake: crumbs/packageselectionpage: added event for the "All packages" tab
and passing the information needed to the function created in the builder.

(Bitbake rev: 840bbdbc973e72d4305c21bcc26c008a6dc39456)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 3c5737a717 bitbake: crumbs/imageconfigurationpage: added information so that it displays correctly
in the information dialogs.

(Bitbake rev: 0301e7622af83c105ba60d7d1749294de06f6a59)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 5b5db02bd7 bitbake: hobwidget: added functionality for the information dialogs.
(Bitbake rev: e4d9729fc66f472266e9dc2f579edeef74d8f289)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu a43792c933 bitbake: crumbs/hoblistmodel: added information columns needed for prop dialogs
in order to display all the information gathered in the
backend, new columns needed to be added in the hoblistmodel.

(Bitbake rev: 0942f05a1196513c6d163f28cf297728aed6ee22)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 0e175284fe bitbake: hig/simplesettingsdialog: added entries for information dialogs
added information so that it would display correctly in the information dialogs.

(Bitbake rev: bf86cc183c250acd0e52755ae6050a2f8d85ccf5)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu a4fdfa7088 bitbake: hig/propertydialog: new class added for the property windows.
this covers functionality for : recipe selection page
                                package selection page
                                information dialogs

(Bitbake rev: 82cb844c92fcc71cefe7d7ddc110523c62185e9e)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu 5b4b8177b5 bitbake: hig/advancedsettingsdialog: Added information for the information dialogs
added information so that it would display
 correctly in the information dialogs.

(Bitbake rev: 7580716b905366aea70c9eed38dc703cecf24219)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:24 +00:00
Andrei Dinu f4bc22c856 bitbake: crumbs/builder: Replaced the function that displayed tooltips
replaced in the builder.py the function that displayed the tooltips
with two functions that display property windows for recipes and packages
pages.

(Bitbake rev: bec3c1dc91118705149d00e5ec2bea08c8db75ed)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Andrei Dinu f988562bba bitbake: cooker: Use extra cache information
-extended cooker.py so that the extra information in cache_extra.py could
 be used

(Bitbake rev: e6c2fa2f6669a4adf890a2ee794b100617223b7b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Andrei Dinu e8b0e190b6 bitbake: cache_extra: Add extra variables
- in order to have the information needed in the property
  windows, cache_extra.py was extended with variables.

(Bitbake rev: bc09090f44f9b3a1b123f5453586295b9623218b)

Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 13:51:23 +00:00
Robert Yang 365eb9b5d2 bitbake: bitbake-layers: fix duplicated help info
There are two "help" lines when run bitbake help under python 2.6.6
(perhaps all python 2.6):

$ bitbake-layers help
[snip]
help
    display general help or help on a specified command
[snip]
help
    display general help or help on a specified command

This is because the cmd.py in python 2.6.6 also has a do_help() function
as our bitbake-layers, and the cmd.Cmd.get_names() doesn't consider the
overload, this has been fixed in python 2.7, use set() to remove the
duplicated would fix the problem.

[YOCTO #3428]

(Bitbake rev: 324ed96e28ec31cff8cef1824d20d40f9a5d46ad)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-10 04:36:52 +00:00
Richard Purdie 164a4cb2fc bitbake: Revert "cooker: parse using bb.compat.Pool"
Reverting the pool changes, terminate does not work reliably on
bb.compat.Pool :(

[YOCTO #3978]

This reverts commit 8af519a49a3374bd9004864ef31ca8aa328e9f34.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-06 15:40:56 +00:00
Richard Purdie ed76a48e68 bitbake: Revert "cooker: now that we use a Pool, raise the exceptions"
Reverting the pool changes, terminate does not work reliably on
bb.compat.Pool :(

This reverts commit 9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-06 15:40:56 +00:00
Martin Jansa 7ed4523963 bitbake: siggen: add quotes around variable values to see whitespace
* without this change it's hard to see what's changed:
  bitbake-diffsigs sstate-cache/*/sstate-depmodwrapper-cross-cortexa8-vfp-neon-oe-linux-gnueabi-1.0-r0-cortexa8-vfp-neon-*_populate-sysroot.tgz.siginfo
  basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
  Variable TUNE_CCARGS value changed from  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8  to  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
  Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3

* with this change, we can see extra trailing space in first version:
  basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
  Variable TUNE_CCARGS value changed from ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 ' to ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8'
  Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3

(Bitbake rev: 7d85b1a383feaa072503d71d3baeb3bdcd1012a8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-04 11:38:30 +00:00
Christopher Larson 914e324582 bitbake: cooker: now that we use a Pool, raise the exceptions
Multiprocessing catches these and handles passing them between processes
itself, we don't need to do it ourselves anymore.

[YOCTO #3926]

(Bitbake rev: 9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-26 07:28:25 -08:00
Robert Yang 35ed979019 bitbake: perforce.py: fix the perforce fetcher
The bb.process.run() will return one tuple, e.g:

p4file = ('strA\nStrB\nstrC\n'), then there will be an iteration on p4file:

for i in p4file:
	[snip]

The i will be 's t r A ...', this is incorrect. use splitlines() to fix
the problem.

[YOCTO #3619]

(Bitbake rev: b7440fb36b419996046f607e66434ce34722272b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-25 05:58:20 -08:00
Paul Eggleton 406cb9920f bitbake: build.py: avoid deleting taint files when writing stamps
The stamp cleaning process that occurs before writing out new stamps for
a task was deleting taint files as well. This resulted in tasks that
were forcibly re-executed using the -f or -C command line options to
have their previous output restored from shared state when called upon a
second time, because the taint value was no longer incorporated into the
task signature and thus it was reverting to its previous value. This
also affected the kernel menuconfig command in OE-Core.

Note that the taint file *is* still deleted when doing -c clean, which
is the desired behaviour.

Fixes [YOCTO #3919].

(Bitbake rev: e6db0ee31178d4386802e720d75303ec7dc21519)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-22 05:22:39 -08:00
Richard Purdie 7d22ef28e6 bitbake: Revert "fetch2: Adapt encode/decode url to use URI class"
This reverts commit 21fe2683aefde10e847e66c11c26d4f4c1e07cfd
since bitbake-selftest doesn't pass when this is applied and
we're seeing multiple build failures from this change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 23:07:23 -08:00
Richard Purdie c78cc0556f bitbake: utils: Improve remove funciton to handle whitespace
Improve the remove function to better handle cases where path contains
special shell chars like whitespaces, '$', ';' or'\'.

Thanks to Enrico Scholz for the fix.

(Bitbake rev: 617511c9f86cc4ef52457653c8adff582d94bce3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:33:05 -08:00
Matthew McClintock 72ebe0c34f bitbake: bitbake/fetch2: workaround urlparse in older python not support git
(Bitbake rev: 7e479dc6a574a8f3bd9f24d2ed1c3ceef91f3828)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:33:05 -08:00
Richard Purdie 9a2a321bab bitbake: wget: Improve mkdir handling
If there there isn't a subdirectory to the downloadfilename, this was
failing. This patch avoids that issue.

(Bitbake rev: 58bfd8d88495d4cae808e23b7af40e65ad05450f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:00:32 -08:00
Christopher Larson 325410e2b2 bitbake: cooker: parse using bb.compat.Pool
(Bitbake rev: 8af519a49a3374bd9004864ef31ca8aa328e9f34)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 08:47:36 -08:00
Olof Johansson 7b59a34360 bitbake: fetch2: Add SFTP fetcher
This fetcher differs from the SSH fetcher in that it adheres more
strictly to the SECSH URI internet draft --- it uses the sftp://
instead of the ssh:// scheme, and it uses sftp instead of scp.

(Bitbake rev: d240baeb7a4107d2eba3f08c411c0f086674d8e2)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson 96f0a39e7c bitbake: fetch2: Add editor modelines for bb.tests.*
(Bitbake rev: 230e00948ba093958e8e89e9ee380444b3dad307)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson dc9d989a5c bitbake: fetch2: Adapt encode/decode url to use URI class
(Bitbake rev: 21fe2683aefde10e847e66c11c26d4f4c1e07cfd)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson f860059a4c bitbake: fetch2: unittests for bb.fetch2.URI class
(Bitbake rev: a71e7d4137d2c5268b406f69992d09c00772a040)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Olof Johansson 7feca4e11e bitbake: fetch2: Add a class representing a generic URI
A class representing a generic URI, with methods for accessing the URI
components, and stringifies to the URI. This class should be a bit more
flexible than the existing {encode,decode}_url functions in that it
supports more components (e.g. port) and that it does not rely on a
specific order on the return values. This makes it easy to add new
properties without affecting the API.

(Bitbake rev: bd824da8a7eafe27310e410807319628378caeca)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Olof Johansson 46bd4fd9f0 bitbake: fetch2: Remove unused code in wget fetcher
(Bitbake rev: 6d88fcee16ced3a8c1ab1daf8e88d36f70f13346)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:04 +00:00
Richard Purdie 55d17578d6 bitbake: fetch2: Ensure directory for stampfile exists before trying to create it
(Bitbake rev: cf510e3da36e53f98ca86501747364bf4699ecc1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 16:17:48 +00:00
Richard Purdie f7836b1299 bitbake: utils: Use rm -rf in remove()
Whilst shutils.rmtree() is pythonic, its also slow. Its faster to
use rm -rf which makes optimial use of the right syscalls.

(Bitbake rev: 96088ebdec08e49ba9e8dbcac437bfcdc21f5983)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 15:53:41 +00:00
Cristiana Voicu 07803d58e0 bitbake: hob: remove save/load template functionality
The Hob templates functionality, in its current incarnation,
is confusing and has no clear utility.

[YOCTO #3696]
(Bitbake rev: 4eb3b6bb9f936808ddf085624078f6479c522c48)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:38 +00:00
Robert Yang e36994f69a bitbake: knotty.py: fix unknown event bb.event.DiskFull
There is an error:

ERROR: No new tasks can be excuted since the disk space monitor action
is "STOPTASKS"!
ERROR: Unknown event: <bb.event.DiskFull object at 0x2ab6310>

This is because we don't handle the event bb.event.DiskFull in
knotty.py, we don't want the knotty to do anything here since we have
done everything in monitordisk.py, so just ignore this event would fix
the problem.

[YOCTO #3523]

(Bitbake rev: 0fa874dbe0532bbe88ade405f514a237e6cd2488)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Robert Yang 86ac3b53b5 bitbake: bitbake-layers: make show-cross-depends avoid long path
The "bitbake-layers show-cross-depends" print the absolute path in the
past, now it will print the relative path (relative to the layer dir) by
default, and add the "-f" option to make it print the absolute path.

For example:

$ bitbake-layers show-cross-depends
[snip]
meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires meta/conf/machine/include/ia32-base.inc
[snip]

$ bitbake-layers show-cross-depends -f
[snip]
/path/to/poky/meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires /path/to/poky/meta/conf/machine/include/ia32-base.inc
[snip]

[YOCTO #3824]

(Bitbake rev: df217701318d60559be0b10214b883b8ce4f5d2a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Cristiana Voicu 2c5ad4059e bitbake: hob: remove parsing warnings when machine is changed
When the machine is changed, the warnings list is emptied and the warnings
bar is hidden.

[YOCTO #3830]
(Bitbake rev: 8e43da7798a98988f7da3f7c424e8f9e5eac2010)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Cristiana Voicu 0e2ee5bd45 bitbake: hob: no sanity checks re-run
Hob was hanging when the user tried a rebuild a new image, because
of sanity checks. It should not re-run sanity checks.

[YOCTO #3829]
(Bitbake rev: f7ff550f53cf3e5b166940db83f27ec733f3ef72)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:37 +00:00
Robert Yang b0587077a4 bitbake: monitordisk.py: disable the inode checking for some fs
There is an error when use disk monitor on btrfs:
WARNING: The free inode of rootfs is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!

This is beucase some fs formats' statvfs.f_files (inodes) is zero, thus
the statvfs.f_favail (free inodes) is zero, too, this a feature of the
fs, we disable the inode checking for such a fs.

[YOCTO #3609]

(Bitbake rev: b2ada3ad5f7aefff107f013e0c9decea481c7ef6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie 804d1d57a2 bitbake: fetch2: Improve lock/done stamp file paths for local files
Currently stamps end up at the top level of DL_DIR even if the files
themselves are in a directory structure. This patch preserves path
components allowing the top level directory to be less populated
which is an advantage for large sstate caches.

(Bitbake rev: 59921ce3ed7a4c0b7f8ef1a101ad9127469bf1fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Cristiana Voicu 95e7dae968 bitbake: bitbake & hob: reparse config files, when sanity check updates bblayers.conf
I've sent a patch to poky, with some changes in sanity.bbclass. When bblayers.conf
is updated, it updates also a variable to know when to reparse configuration files.
This patch contains the changes to reparse conf files, after a sanity check which
changes bblayers.conf.

[YOCTO #3213]
(Bitbake rev: 966e3e59ceb1c8b33b5881f291c148ea6513eda0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie d5ef2e5cc0 bitbake: fetch2: Ensure expansions happen in URL parameters in uri_replace
For example, this allows us to specify downloadfilename=PATH in sstate
mirror urls to improve directory structures in DL_DIR when using sstate.

(Bitbake rev: 7850a1364b6b37c58664d84f9c14806b4479b45c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Olof Johansson 423dd2f7cd bitbake: ConfHandler: Use re.X to make long regexp more readable
The __config_regexp__ in ConfHandler is quite long, and using re.X to
break the expression onto several lines make it a bit easier to read.

(Bitbake rev: 54dce9e14ab0657d76f0d0ae22eef7fab8e8950d)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:36 +00:00
Richard Purdie bc7c8fa99a bitbake: tests/codeparser: Hack around circular inclusion problem
There is a circular dependency issue where bb.data can't directly depend on
bb.parse. The tests were failing due to this issue which is misleading. This
patch hacks around it for now. I'd rather that than not running tests at all.

(Bitbake rev: a206ae0d7769a41ff3666d0f53ff9cf422dfa518)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie 07dcffe7ec bitbake: wget: Only use -O option when not spidering
If we pass the -O option whilst spidering, empty files are created which is not
desired. We also need to ensure any subdirectories are created when using the
downloadfilename parameter.

(Bitbake rev: d5f78e98d5aba36c95288fbaac267c2d54537b02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie f966c544aa bitbake: codeparser: Track bb.utils.contains usage
The bb.utils.contains function usage is getting increasingly used in the metadata
but isn't handled automatically by the python dependency tracking code. This patch
changes that and also adds the "OE" names for the functions.

Whilst there are reasons this is a bad idea, its likely outweighed by the
shear number of these references and the current holes in dependency information
which we're now relying heavily upon.

(Bitbake rev: 0b9d117631ce909312d53b93289e61defc6be01c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie 7e6f9baae1 bitbake: codeparser: Track appendVar and prependVar calls as we do for getVar
We need to track appendVar and prependVar calls just as we do for getVar in order
to ensure we're not missing variable dependencies.

(Bitbake rev: 767b4751232f4ee3979deb4d3f733fcf9ee2bd44)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Christopher Larson 34571f4c10 bitbake: Remove whitelisted vars from non-task deps
Though the value of variables in the BB_BASEHASH_WHITELIST is kept out of the
checksums, dependency on them is not, at least for variables and non-task
functions. In the code, the whitelist is removed from the overall task dep
list, but not the individual variable deps. The result of this is that
functions like sysroot_stage_all and oe_runmake end up with whitelisted
variables like TERM listed in their dependencies, which means that doing
a 'unset TERM' before building will result in all checksums for tasks that
depend on those changing, and shared state reuse not behaving correctly.

This is only really a potential issue for variables from the environment, as
it's the existance/removal of the variable that's an issue, not its value, and
the other whitelisted variables are set in our metadata. This which means in
practical terms the only cases where this is likely to be an issue are in
environments where one of the following are unset: TERM, LOGNAME, HOME, USER,
PWD, SHELL. This may seem like an unlikely circumstance, but is in fact a real
issue for those of us using autobuilders. Jenkins does not set TERM when
executing shell, which means shared state archives produced by your jenkins
server would not be fully reused by an actual user.

Fixed by removing the whitelisted elements from the individual variable deps,
not just the accumulated result.

(Bitbake rev: dac12560ac8431ee24609f8de25cb1645572d350)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 11:14:06 +00:00
Richard Purdie 83e1015684 bitbake: ConfHandler: Improve regexp to fix mis-parsing of += and no whitespace
If you have:

FOO = "a"
FOO += "b"
FOO+= "c"

The expected result is "a b c" however we were seeing "a b" with the FOO+
variable being assigned the value "c". This isn't the expected result.

We need to make the name part of the variale non-greedy so that any + character
becomes part of the operator. This patch does that. I compared the configuration
in OE-Core before and after the change and only the test case changed.

[YOCTO #3834]

(Bitbake rev: 2cd8d7fd12a646e6516e2c985e6a54121d19eb59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-14 10:46:26 +00:00
Richard Purdie b6d8f96ee5 bitbake: bitbake/utils: Improve environment handling to allow UIs access to original environment
We need to empty out the environment whilst we build the cooker but
we need the environment for the UIs since hob uses DISPLAY and other
session variables.

This patch adapts the utils functions to return removed environment
components so we can reinject them for use by the UI, allowing hob
to work again.

(Bitbake rev: fc330d810099c57fefd4e706159a73ad8401d97c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 11:11:26 +00:00
Richard Purdie 1ef926cf78 bitbake: prserv/serv.py: Fix logging in daemon mode
In deamon mode we need to ensure the logging module is sending log data to the
log file. These changes ensure this happens correctly.

(Bitbake rev: bb53b47710ca4579e20284668cb354f734c3d502)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:45:36 +00:00
Richard Purdie bdfc5207a0 bitbake: bitbake: Always use separate process for PR Service
Using the threading module interacts badly with multiprocessing used elsewhere
in bitbake under certain machine loads. This was leading to bitbake hanging on
Ctrl+C when the PR Server was being used.

This patch converts it to always use the daemonize code which
then means the threading code isn't required.

[YOCTO #3742]

(Bitbake rev: 2d0bbd9398ab839bd2d1e29e50b25d52efb1ce2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 23:45:36 +00:00
Richard Purdie 945cd710cb bitbake: Update version to 1.17.0
(Bitbake rev: d96ef9398356b2a61f7cff765821616bf1e55492)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart fe84fe0209 bitbake: fetch2: Remove broken git variables from the environment
The following variables perform no function outside of bitbake:

    GIT_CONFIG
    GIT_PROXY_HOST
    GIT_PROXY_PORT
    GIT_PROXY_IGNORE

GIT_CONFIG only affects the git-config command which is not relevant to
the fetcher. This was previously used with the OE GIT_CORE_CONFIG
variable which would provide a basic git config to use instead of the
user's config. This usage was deprecated by git for over a year now:

http://git.661346.n2.nabble.com/Overriding-gitconfig-using-GIT-CONFIG-td6680977.html

GIT_PROXY_HOST and GIT_PROXY_PORT are not used by git.

GIT_PROXY_IGNORE was an OE construct used to create the custom git
config and had no meaning outside of the OE environment. It is not used
by git.

Remove these variables from the fetcher environment.

Users wishing to configure git to work with a proxy should define the
GIT_PROXY_COMMAND environment variable to use an external script.
NO_PROXY can be used within this script to skip the proxy for certain
hosts.

(Bitbake rev: e60270bdce6b8c2f8da1a4838aa374da9db3c86a)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart 3863dfce62 bitbake: fetch2: Export upper and lower case environment variables
Applications are inconsistent in their use of upper and lower case proxy
variables. Curl, for example, specifies NO_PROXY (not no_proxy) in the
man page (changed in 2009 [1]). Avoid proxy issues by ensuring both the
upper and lower case versions of each proxy variable is available in the
environment for the fetcher commands.

Add FTPS_PROXY and ftps_proxy to the list as well.

1. http://curl.haxx.se/mail/tracker-2009-04/0012.html

(Bitbake rev: c3e6b2c5ec81d5ad7dcf606fff16fd5552bd267c)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 6fecb1a3e0 bitbake: cooker/utils: Drop custom 'interactive' variables list and store environment in BB_ORIGENV instead
Maintining hardcoded lists of user environmental variables is hacky,
replace these with the savedenv datastore. Allow access to that
through the BB_ORIGENV variable.

(Bitbake rev: 0a99563a4ea270594fd9a61da46f9387fb79dc66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Richard Purdie 1f192a7ade bitbake: compat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues
python 2.7 shows hangs with issues in its pool implmenetation. Rather than
try and hack around these, add a copy of the working pool implementation
to the compat module from 2.7.3.

(Bitbake rev: c9eb742637131e8dbd526d2ad9b458abea0a2d87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 13:13:01 +00:00
Darren Hart ee1f126ad5 bitbake: bitbake: fetch2: Print the complete SRCREV variable name when INVALID
If a particular SRCREV (say for a particular branch) is missing, the
fetcher will currently just report an obtuse error about the "SRCREV"
being invalid. If there is more information is to be had (say from name,
i.e. branch, and pn) then display that as well.

The new error looks something like this:

ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://otcgit.jf.intel.com/dvhart/linux-yocto-minnow-3.4.git;protocol=git;nocheckout=1;branch=standard/minnow,meta,emgd-1.14;name=machine,meta,emgd'. Please set SRCREV_emgd_pn-linux-yocto to a valid value

Note the variable listed as invalid is
"SRCREV_emgd_pn-linux-yocto", making it explicit what is wrong.

(Bitbake rev: 63774f5b4edb999300bddd891233f6050f4af877)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-05 15:22:45 +00:00
Robert Yang 8d80483e2f bitbake: bitbake-layers: print the recipe's depends that crosses a layer boundary
Figure out the dependency between recipes that crosses a layer boundary

* Introduction:
  - For the .bb file, we need check the following depends:
    > Check the DEPENDS, RDEPENDS and inherits according to the
      cooker_data.
    > The cooker_data doesn't have the info about "require/include xxx",
      so we need check them manually.

  - For the .bbclass, .inc and .conf file, we can't get their file
    depends from the cooker_data, we need check them manually.

* Usage:
  $ bitbake-layer show-cross-depends

  I don't like the name "show-cross-depends", figure-out-cross-depends
  might be better, but most of the commands are "show-xxx" for bitbake-layers.

* Output: (snipped)
/work/poky/meta/recipes-support/libusb/libusb-compat_0.1.4.bb inherits /work/poky/meta-yocto/classes/poky-sanity.bbclass
/work/poky/meta-intel/meta-cedartrail/recipes-cdv-media/images/core-image-cdv-media.bb requires /work/poky/meta/recipes-sato/images/core-image-sato.bb
/work/poky/meta-yocto/recipes-core/tiny-init/tiny-init.bb RDEPENDS /work/poky/meta/recipes-core/busybox/busybox_1.20.2.bb
/work/poky/meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb DEPENDS /work/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
/work/poky/meta/classes/distrodata.bbclass includes /work/poky/meta-yocto/conf/distro/include/package_regex.inc
/work/poky/meta-intel/meta-sys940x/conf/machine/sys940x.conf requires /work/poky/meta/conf/machine/include/tune-atom.inc

[YOCTO #3387]

(Bitbake rev: 100502ef722bf19b6c125a5e017f31686ad18421)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 14:00:03 +00:00
Martin Jansa d82eac8041 bitbake: ssh.py: add example SRC_URI
(Bitbake rev: f838af8e7afebf279ffb00a3afa6592f061b703f)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:21 +00:00
Martin Jansa 9df0588ab4 bitbake: ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git
* taken from SFTP fetcher:
  http://patchwork.openembedded.org/patch/43027/

(Bitbake rev: 88e565855b52e905156d85c3f45b341cddfe2f55)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:21 +00:00
Martin Jansa e863851045 bitbake: ssh: fix fetcher
* set localpath in urldata_init
  otherwise localpath and basename were None, when fetcher was trying to
  define .lock and .done paths
  basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename))
* remove "host" from localpath
  .done and .lock files are always using just basename, so if someone
  has 2 recipes with:
  SRC_URI = "ssh://foo/file.txt"
  SRC_URI = "ssh://bar/file.txt"
  then there will be only one file.txt.done in downloads anyway (and
  only first file.txt from first server will be returned on do_fetch

(Bitbake rev: 41208760d70a657297f9ecfb48b74e2c3b594e70)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu c30ef8886d bitbake: hob: eliminate the "by recipe" grouping in the packages table
We have agreed to change how we show the packages. Now they are not grouped by
recipe. Until now, it was implemented using  TreeStore and I've changed it to
extend a ListStore. I have modified all the function in according to this.

[YOCTO #2180]
(Bitbake rev: 311e7ba8b2c88fbf6f16b6ffb1400226b155ddd4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu b2ab771447 bitbake: hob: Use a GtkTreeView to present and configure the sstate mirrors
After some discussions about the design of the Shared State Settings tab in Hob,
we have decided that using a GtkTreeView to present and configure the sstate
mirrors is probably the best solution.

[YOCTO #3569]
(Bitbake rev: 2ff636910b9cf3099e8d961f4bbe71512c015ecc)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Christopher Larson 785e1ba012 bitbake: tinfoil: support other fds, enable color support
Rather than only handling sys.stdout, also support any arbitrary file object,
and enable color for the formatter if that file is a tty.

(Bitbake rev: c46db4be4cc4dc53376ed3f574b2f1c868730f2a)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu 5deae14080 bitbake: hob: small fixes to parsing warnings dialog
Set the labels selectable; reset the warnings list when another machine is selected;
changed a label name

[YOCTO #3215]
(Bitbake rev: a4463d7b51828c32e55dea3c0dd51966d387abac)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:20 +00:00
Cristiana Voicu f0aef9953d bitbake: bitbake & hob: implement functions to assure consistency for configuration files
Added a new command in bitbake to save a variable in a file; added a function
in cooker which is called by this command.

Added new command in bitbake to enable/disable data tracking.

The function saveConfigurationVar from cooker.py saves a variable in the file that
is received by argument. It checks all the operations made on that variable, using the history.
If it's the first time when it does some changes on a variable,it comments the lines where
an operation is made on it, and it sets it in a line to the end of file. If it's not
the first time(it has a comment before), it replaces the line.

Made some changes in hob to save the variables from bblayers.conf and local.conf
using the bitbake command.

[YOCTO #2934]
(Bitbake rev: 55b814ccfa413d461d12956896364ab63eed70a8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-31 12:46:19 +00:00
Richard Purdie 53dec01483 bitbake: cache.py: Drop support for BROKEN variable
All it now does is function in a similar way to EXCLUDE_FROM_WORLD and
since we have a better named variable for this, lets just drop the
usage of BROKEN at the bitbake level.

(Bitbake rev: 8f4dcf794545273417d78ba18f51aa2b81606ae4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-30 14:06:00 +00:00
Richard Purdie cfb082961a bitbake: build.py: Dump out performance data of individual tasks
(Bitbake rev: 32aa49519e4f015e3c21466a7e5dc939f6369851)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 14:49:05 +00:00
Richard Purdie dd335b0908 bitbake: utils.py: Add function for processing profile output
(Bitbake rev: 0df64810e8d40e7761cfd5059c0617dda31a6641)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-28 14:49:05 +00:00
Richard Purdie ff72823d40 bitbake: bitbake-diffigs: Don't pull in tinfoil unless we really need/plan to use it
This means we can run in parallel with other bitbake processed we're not in
task mode.

(Bitbake rev: 20222f2f16130e91eed5e68286188ee0e8f8f3bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:58:35 +00:00
Robert Yang 4a09c91ce4 bitbake: bitbake-layers: fix get_file_layer
The get_file_layer can't handle the nested layer correctly, e.g.:

meta-intel/conf/layer.conf
meta-intel/meta-cedartrail/conf/layer.conf

They are two layers, the file:
meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb
belongs to meta-intel's layer, but the get_file_layer() may return
meta-cedartrail accordig to BBLAYERS' order, since it uses:

for layerdir in self.bblayers:
    if regex.match(os.path.join(layerdir, 'test')):
        return self.get_layer_name(layerdir)

which doesn't care the filename, re-match the filename would fix the
problem.

[YOCTO #3387]

(Bitbake rev: 7a31b9eac4d894c302f0e052a132c31b17d13d1f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:09 +00:00
Robert Yang 3183902e18 bitbake: cache.py: remove the duplicated self.file_depends
There are two "self.file_depends =" lines in cache.py::CoreRecipeInfo:

class CoreRecipeInfo(RecipeInfoCommon):
    __slots__ = ()

    cachefile = "bb_cache.dat"

    def __init__(self, filename, metadata):
        self.file_depends = metadata.getVar('__depends', False)
    [snip]
        self.file_depends = metadata.getVar('__depends', False)

They are duplicated, remove the last one.

[YOCTO #3795]

(Bitbake rev: 409a4aa0e166c25a8cfcd91e54f1b61cced74e87)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Cristiana Voicu 03fee6c3b1 bitbake: hob: hob do not use .hob dir for variables from local.conf and bblayers.conf
If .hob exists, hob takes the variable from there. Change to not override anymore
the variables which comes from bblayers.conf and local.conf

[YOCTO #2934]
(Bitbake rev: 00533e83038e3d5e3cd5d1be73c45afece92ec0c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Constantin Musca 1db3531cd5 bitbake: prserv: use only PRSERV_HOST
- remove PRSERV_PORT variable
- use 'hostname:port' as PRSERV_HOST format
- use 'localhost:0' for enabling the local PRServer

[YOCTO #3744]

(Bitbake rev: ad62eed9e1f0867a406e9fbfa44916a0f1ad1282)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:08 +00:00
Richard Purdie cd9ff3c676 bitbake: crumbs: Add file lost from previous commit
(Bitbake rev: 90aabeb87d6c1f00d6333cc9930626d36b6d9709)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:38:09 +00:00
Cristiana Voicu 685cde5065 bitbake: hob: combo box updated correctly
The 'select a base image' option is no longer displayed once
an image is selected

[YOCTO #3671]
(Bitbake rev: 27f2247b4c227c3b5adb1ca33d0cd7f7b492e170)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Constantin Musca 5fc3fc343e bitbake: persist_data: add get_by_pattern method to API
- one can use get_by_pattern to get a list of values associated
with keys that match the specified pattern

(Bitbake rev: 6ee1f58698e2d782c54ce5aec271bcec26107eac)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Constantin Musca 1e50274f55 bitbake: parse_py: add ~ to config_regexp
- enable the '~' character in bitbake variables

(Bitbake rev: 7c15ff1d50d7b601414f1d55c90e3c59981a0876)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-22 15:35:06 +00:00
Cristiana Voicu 37e025f6f9 bitbake: hob: Hob should display warnings generated during parsing
-now Hob catches the warnings generated during parsing, and after the parsing
is completed, if there are any warnings, it shows a bar that contains a message
with how many warnings has encountered, and a button "View warnings"
-when "View warnings" button is clicked, Hob shows a dialog with the warnings;
if there more than 1 warning, you can use "Previous" and "Next" button to see them

[YOCTO #3215]
(Bitbake rev: d7b5311d35b3974398fecabfb5ecf1effa85c27e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 19:05:31 +00:00
Cristiana Voicu 4c1ebc7ca7 bitbake: hob: progress bar changed to busy cursor when you open log file
-the first implementation for this bug used a progress bar, that is shown
during open file process; it revelead that the progress bar stops earlier
-now I have implemented using gtk.show_uri() method, that shows itself a
busy cursor when it opens a file;
-deleted the code for the first implementation

[YOCTO #2997]
(Bitbake rev: 09d1c4c2db124104b9da460547b20a2c2ff07bb3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 19:05:31 +00:00
Richard Purdie a5358511b1 bitbake: BBHandler/ConfHandler: Merge fix for multiline comments
This was meant to be squashed into the previous commit for multiline comment
handling. It fixes the case the commented multiline is followed by an empty
line which was resulting in a traceback instead of a sane error message.

(Bitbake rev: 7e7d692e244fe8dca533f842ca143b9c821e317c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 11:01:53 +00:00
Richard Purdie 73dc22b728 bitbake: bitbake: BBHandler/ConfHandler: Improve multiline comment handling
Faced with an expression like:

 # Some comment \
 FOO = "bar"

what should bitbake do? Technically, the \ character means its multiline and
currently the code treats this as a continuation of the comment. This can
surprise some people and is not intuitive.

This patch makes bitbake simply error and asks the user to be clearer
about what they mean.

(Bitbake rev: 589d31ce41e019ee6a7cb6527d67bc76c0b6382a)

(Bitbake rev: 79c00fabe08b4c210a3bd81cfaffbc47ffdc2e2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-21 10:55:45 +00:00
Jessica Zhang 2ad1894520 bitbake: hob: Fix GTK+ and PyGtk version check error message to be more clear
Improve the error message the user sees if the versions are incorrect.

[YOCTO #3637]

(Bitbake rev: 7e3a99949358f4362876df5a82f8aeaae72c3c97)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:53:05 +00:00
Jon Szymaniak 94284f1ce0 bitbake: hg.py: Fixed fetch failure that occurs when SRCREV is a tag.
Removed "-r REV" from hg clone invocation to fetch the entire repo,
rather than just the subset at the specified revision. This will ensure
that the specified tag exists for successive commands (e.g., the update
built on line 149.)

(Bitbake rev: f0a6261d3a8ede9ebdb6383e02cb2c2de1690640)

Signed-off-by: Jon Szymaniak <jon.szymaniak@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:50:13 +00:00
Tyler Hall 0e408df69f bitbake: fetch2: Sort file checksums by value, not path
Changing the path to a file could change the task hash even if the file
still has the same checksum. This occurs when the task depends on
multiple files and the sort order of their paths changes. Usually the
sorting is consistent because layers tend to have the same relative
paths, but this should take care of other configuations.

The problem arose when using a .bbappend to add files to a recipe in
another layer. If the layer is located alongside the other layers and
their parent directory is moved, the hash does not change. However,
moving the .bbappend layer outside of the common directory can change
the path sort order and the task hash.

(Bitbake rev: 22bd19d208f0251f5a1f9b98f3cac66181f3fc07)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:50:12 +00:00
Peter Seebach fe30cbc2cb bitbake: bitbake: data_smart.py and friends: Track variable history
This patch adds tracking of the history of variable assignments.
The changes are predominantly localized to data_smart.py and
parse/ast.py. cooker.py and data.py are altered to display the
recorded data, and turn tracking on for the bitbake -e case.
The data.py update_data() function warns DataSmart.finalize()
to report the caller one further back up the tree.

In general, d.setVar() does what it used to do. Optionally,
arguments describing an operation may be appended; if none
are present, the operation is implicitly ignored. If it's
not ignored, it will attempt to infer missing information
(name of variable, value assigned, file and line) by examining
the traceback. This slightly elaborate process eliminates a
category of problems in which the 'var' member of the keyword
arguments dict is set, and a positional argument corresponding
to 'var' is also set. It also makes calling much simpler for
the common cases.

The resulting output gives you a pretty good picture of what
values got set, and how they got set.

RP Modifications:

a) Split from IncludeHistory to separate VariableHistory
b) Add dedicated copy function instead of deepcopy
c) Use COW for variables dict
d) Remove 'value' loginfo value and just use 'details'
e) Desensitise code for calling order (set 'op' before/after
   infer_caller_details was error prone)
f) Fix bug where ?= "" wasn't shown correctly
g) Log more set operations as some variables mysteriously acquired
   values previously
h) Standardise infer_caller_details to be triggered from .record()
   where at all possible to reduce overhead in non-enabled cases
i) Rename variable parameter names to match inference code
j) Add VariableHistory emit() function to match IncludeHistory
k) Fix handling of appendVar, prependVar and matching flag ops
l) Use ignored=True to stop logging further events where appropriate

(Bitbake rev: f00524a3729000cbcb3317fee933ac448fae5e2d)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:19 +00:00
Peter Seebach 4dd6d9139c bitbake: bitbake: data_smart.py and friends: Track file inclusions for bitbake -e
This code adds inclusion history to bitbake -e output, showing
which files were included, in what order. This doesn't completely
resolve timing questions, because it doesn't show you which lines
of a file were processed before or after a given include, but it
does let you figure out what the path was by which a particular
file ended up in your build at all.

How it works: data_smart acquires a .history member, which is an
IncludeHistory; this represents the inclusion of a file and all its
inclusions, recursively. It provides methods for including files,
for finishing inclusion (done as an __exit__), and for
dumping the whole tree.

The parser is modified to run includes inside a with() to push
and pop the include filename.

RP Modifications:

a) Split Include and Variable tracking
b) Replace deepcopy usage with dedicated copy function
c) Simplify some variable and usage

(Bitbake rev: b2dda721262da8abb7dc32d019e18fbc32ed8860)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:19 +00:00
Richard Purdie 9753283a3f bitbake: BBHandler/data: Standardise some setVar access formats
(Bitbake rev: e12c1a485f96a4701144ac81179ae1af348e5bf3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 12:35:18 +00:00
Bogdan Marinescu 7bfb98568a bitbake: hig.py: refactor into individual components
Since hig.py was becoming too large (which impacted maintenance and
operations like git merges) it was split into individual files for
the classes that were implemented in hig.py. hig is now a Python
package (lib/bb/ui/crumbs/hig/). The patch was tested by
building core-image-basic/qemux86 in Hob and accessing the various
UI elements implemented in hig. Note that the patch does not change
the functionality of Hob in any way, it's just a code refactoring
that should make life a bit easier for Hob developers.

[YOCTO #3200]

(Bitbake rev: a7a2b730f915cafe7aa30539622dd1ca64ae41f5)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-16 12:51:33 +00:00
Richard Purdie 39eb22bbc4 bitbake: build.py: Fix traceback when there are no dependencies
A recipe with no dependencies results in a traceback (e.g. all in
ASSUME_PROVIDED). This shouldn't happen and this patch fixes it.

(Bitbake rev: dee7decf87dfa8cb966fe40846d27f3e6ab1846b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 17:38:23 +00:00
Constantin Musca d0f35207f9 bitbake: fetch2: remove localcount and use AUTOINC instead
- do not use the BB_URI_LOCALCOUNT database for computing revision
incremental numbers anymore
- sortable_revision now generates "AUTOINC+${latest_rev}"
- use one incrementing value rather than several
- PV becomes 0.1+gitAUTOINC+deadbeefdecafbad_decafbaddeadbeef
- remove all localcount code and simplify the fetcher
- this patch addresses the following proposal:
http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-November/003878.html

(Bitbake rev: 61cf01c5c236b4218f40cfae7c059c2b86765dbd)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:42:19 +00:00
Richard Purdie f39e75ddef bitbake: data: Ensure emit_func honours vardeps flag
Currently, calling a shell function using exec_func may result in
dependent functions being missing, if the shell parser can't detect
the dependency, even if it was specified with the vardeps flag.

This patch ensures the function looks at the flag and considers it
when deciding which other functions need to be output.

[YOCTO #3561]

(Bitbake rev: a906c94328b040d5076571bd593b57be7ee403a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-17 17:42:19 +00:00
Cristiana Voicu 958162e96b bitbake: hob: use base image only if it was set
As it is, when you create a new image from scratch, hob gives an error.
This is because of the patch for #2601.

(Bitbake rev: 42d9db0cc80ed45d769f843ccb51e0c194ec557b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 17:31:31 +00:00
Cristiana Voicu f9d9cc87c5 bitbake: hob/bitbake: custom image is now using the base image
Till now, a custom image made in Hob was using only the packages from
the base image. Now it is using everything declared in the base image.
Also next to hob-image.bb, it creates another .bb file which is used
in building process. Those images are ignored by git.

[YOCTO #2601]
(Bitbake rev: 22007cf71a00fbb03b40f97201a6eb06c9aebd16)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:49 +00:00
Mihai Lindner a947b547d0 bitbake: knotty: use bb.error instead of print
Change to use bb.error instead of print, or maybe that was desired (?)
Also remove a tab, while in the neighborhood.

(Bitbake rev: 4a36a1af71530afc8fa896271fa94362ead176bd)

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:49 +00:00
Robert P. J. Day ad29d14099 bitbake: git.py: A bit of tidying up regarding grammar and supported protocols.
Doc cleanup, no functional change.

(Bitbake rev: 5161a84f5dcfe748382a5073349bf10ed21641f9)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:48 +00:00
Eren Türkay 6ec6bf4e4f bitbake: bitbake.vim: detect *.bbappend files in ftdetect automatically
Currently, *.bb and *.bbclass files are automatically highlighted and
detected as a bitbake file. Since *.bbappend files are also bitbake
files, vim plugin should automatically detect and highlight it as well.

(Bitbake rev: 0668a0ea968baf930f05806a5452c8dbe4ec35ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 13:08:48 +00:00
Richard Purdie 853d707af5 bitbake: data_smart/BBHandler: Fix SkipParse exception handling
If SkipParse is raised from something which isn't anonymous python, it wasn't
being handled correctly. This improves the handling for example from within inline
python.

(Bitbake rev: 7467d7d66b24cc8f43ab168e65895e7c4aee6092)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie 5d968368bc bitbake: bin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbake
The method this older code was accessing doesn't exist. A library shouldn't
be changing behaviour based on the environment anyway when sepcific function
calls exist to correctly setup the logging. Fix the crash if BBDEBUG was used
by moving the code to bin/bitbake.

[YOCTO #3319]

(Bitbake rev: 3a1b75037fe1e5282ffd40b037e93353405faa45)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie dc637ae860 bitbake: command: Fix getCmdLineAction bugs
Executing "bitbake" doesn't get a sane message since the None return value
wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as
otherwise an invalid variable is accessed which then crashes the server
due to the previous bug.

(Bitbake rev: c6211291ae07410832031a5274690437cc2b09a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:04 +00:00
Richard Purdie 1572c1517c bitbake: command: Add missing import traceback
Without this, if an exception occurs the server will silently crash
with no feedback to the user about why (since traceback isn't imported).

(Bitbake rev: e637a635bf7b5a9a2e9dc20afc18aceec98d578f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-14 12:36:03 +00:00
Richard Purdie 3dc3fe32e3 bitbake: BBhandler/data: Fix __inherit_cache duplication
The inherits cache contains duplicate entries, some with the full patch, some
just starting classes/xxx. This is a waste of parse time and potentially
error prone. This patch fixes various pieces of code so the absolute paths are
always preferred and work correctly. The inherits_class function did not work
with full paths so the patch fixes this.

(Bitbake rev: f3a71e509af196391ec126d079cf1bd178e62ad5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:59:42 +00:00
Richard Purdie 8ead7dc3cc bitbake: BBHandler/ast: Simplify/fix EXPORT_FUNCTIONS usage
The current usage of EXPORT_FUNCTIONS is rather problematic since a class
list (classes) is passed into the ast statement and cached as it was
when first parsed. This class list may be different in other cases but
is locked once in the cache.

Worse, the construction of classes can be broken by exceptions during parsing
at the wrong moments since the state of the parser is not always reset
correctly. This can lead to leakage of other classes into the classes list.

The current EXPORT_FUNCTIONS implementation looks at the last two currently
inherited classes and sets up an indirect function call view the second last
class inherited, e.g.:

 do_configure calls gnomebase_do_configure
 gnomebase_do_configure calls autotools_do_configure

This intermediary doesn't seem to serve a useful purpose.

This patch therefore makes builds deterministic and fixes various cache problems
and indirection by removing the intermediaries and simply performing
directly mapping for the cases where its needed.

(Bitbake rev: 9fc98f96f0e0320beda0ce9546275a99336732c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-11 15:59:42 +00:00
Richard Purdie c607095894 bitbake: Revert "BBHandler: Ensure parser state engine is correctly reset for new parsing"
This reverts commit 3dc5e896a97154914cee6c47900e3bb2a2627cdb.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 18:09:01 +00:00
Richard Purdie 23200858b4 bitbake: BBHandler: Ensure parser state engine is correctly reset for new parsing
The classes variable in particular could be in an odd state if parsing of a
previous recipe had abruptly ended.

(Bitbake rev: 3dc5e896a97154914cee6c47900e3bb2a2627cdb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:13 +00:00
Richard Purdie ce6199fd98 bitbake: xmlrpc: Unbreak the transport by adding a missing logfile name
I appreciate a fixed value is suboptimal but this is better than not
working at all!

(Bitbake rev: d338a1ad14680af41d218772decd03e98eb2cad5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:02 +00:00
Richard Purdie 7e1e4aeea2 bitbake: uievent: Fix an init race
There is a race where the registerEventHandler() server call may happen in
a different thread to the main UI, causing the main UI to see
httplib.CannotSendRequest exceptions.

This moves the call into the main thread, removing the init race and fixing
errors I was seeing with the xmlrpc backend.

(Bitbake rev: 14cdd3b351d1ab23cb3ea5f853e403a53e67ac1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Cristiana Voicu e77f0570e8 bitbake: hob: modified how the existence of a variable is checked
(Bitbake rev: 4214ffff2c8a2a1fe66cbade03d2fd9e22a682d2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-04 18:02:01 +00:00
Richard Purdie 73f57eb939 bitbake: data_smart: Improve get_hash to account for overrides and key expansion
An issue was uncovered where changing:

IMAGE_INSTALL_append = "X"

to

IMAGE_INSTALL_append = "X Y"

in local.conf would not get noticed by bitbake. The issue is that
the configuration hash doesn't account for overrides or key expansion.

This patch improves get_hash to account for these. This means the hash
does account for changes like the above.

[YOCTO #3503]

(Bitbake rev: 86bf1f5603e8f98019544e45f51bd0db9a48112a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 15:13:17 +00:00
Richard Purdie 525cc08cc5 bitbake: build.py: Preserve sigdata files in the stamps directory
Leaving the sigdata files around can aid debugging and doesn't harm
anything. This is the easiest way to allow this to happen.

(Bitbake rev: 1f500149ecd533a6edbeea902c3f1e009c755154)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 15:13:17 +00:00
Richard Purdie 9de050111b bitbake: build/siggen.py: Avoid removing too many stamps when cleaning
The "*" part of the mask is to ensure we clean both any stamp, and any
setscene varient. It turns out we would also trample other tasks,
e.g. do_package_write could trample do_package_write_rpm. do_package also
tramples do_package_write_* but this is less of an issue since the other
tasks depend on it.

Rather than use the wildcard, we can just use a list instead.

[YOCTO #3484]

(Bitbake rev: c14d831ea3f625e9a47266a0c4e6deefc924ca5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 14:14:07 +00:00
Cristiana Voicu 4493b107a7 bitbake: hob: when BBLAYERS_NON_REMOVABLE is not set hob shows an error
(Bitbake rev: a40ceda3b349c4461f4b7bc0e18cd966fff5e3cf)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 09:19:46 +00:00
Cristian Iorga a0cf759537 bitbake: fetch2/wget: Fix for mixed-up wget commands
wget commands for check and resume were
mixed-up, leading to the following issues:

1. long running "NOTE: Preparing runqueue"
reason: objects were downloaded, not spidered on the mirror
2. Failing network test in Build Appliance, because wget 1.14
(in use in BA) will fail if a file already exists.
During the network connectivity test, index.php file was
actually downloaded, not spidered (checked for existence on
yoctoproject.org website), leading to wget failure.

(Bitbake rev: d7a5185cae975eaca50a9785c6605e895dc7bb51)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Richard Purdie 408a0d8b25 bitbake: fetch2/local: Fix bug introduced by expression ambiguity
The last changes introduced an error in some of the logic. Add brackets
to clarify the meaning of the expression and fix certain build failures.

(Bitbake rev: 87aea65bd5d553bd0495b0f1efe6d41d0bb2810f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Cristiana Voicu 73b9f64357 bitbake: hob: make some layers non removable
- there are some layers which cannot be removed; so ,I have used
a new variable called BBLAYERS_NON_REMOVABLE located in bblayers.conf,
which contains those layers which cannot be deleted
- "meta-hob" layer is added to this variable in hob code, like it's
added to BBLAYERS var

[YOCTO #3176]
(Bitbake rev: 05da1621eed4c6201cd65372d229f63ea8a44b6e)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 20:57:30 +00:00
Richard Purdie c6dc0b9767 bitbake: Update version to 1.17.0
(Bitbake rev: cc7fdbdc607df530f5539b162831bf9998eb48d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 6a2ce81fc6 bitbake: fetch2: Avoid using FILESDIR in unpack
Currently there is code which uses FILESDIR in unpack to ensure
parent directories are created, leading to differing behaviour depending on
which search path is used to locate the directory.

This change standardises the code and takes the data from the fetcher in
question meaning we can standardise the code and deprecate FILESDIR.

(Bitbake rev: 1cccb3bd01ed82e4978acfef0fda1bd797eef72a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 7420cf5d67 bitbake: fetch2/local: Improve handling of wildcard matches
Currently wildcard matches end up working by FILESDIR being defined
in the metadata to a default of "." in FILESPATH which is hacky at best.

This patch adds the behaviour into the fetcher so its at least slightly
more explicit.

(Bitbake rev: 07b5f84133ac79aac4e939ea5f24390ad7f940a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-26 10:01:24 +00:00
Richard Purdie 9be83df144 bitbake: knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruption
Using curses initscr/endwin causes screen corruption if for example you
suspend bitbake and resume it. This changes the code to use a less
invasive approach to determining colour availability on the terminal.

(Bitbake rev: 4548a8f037eaf8d47a77052acc3e9ec264ac41e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Constantin Musca 8a3dd9e908 bitbake: hob/builder: Don't rerun sanity checks
Run the sanity check only once

[YOCTO #3377]

(Bitbake rev: 0db80d57d4d2b1bb97375444c439827450ff33d1)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Cristiana Voicu f26d3e8d5f bitbake: hob: showing when build fails because out of disk space
-to enable this in hob, first you have to enable this in bitbake using
BB_DISKMON_DIRS and/or BB_DISKMON_WARNINTERVAL vars
-created "restart the build" action on the build_fail_top_bar

[YOCTO #3357]
(Bitbake rev: 964ac25d153ff4da144963289a32066db0e28b89)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-25 21:36:44 +00:00
Richard Purdie dee77eca39 bitbake: server/process.py: Change timeout error handling
In normal usage, we never hit the timeout issue. If we do, it becomes obvious
that the current error handling is not good enough. The request may have made it
to the server and the answer will get queued. This means the next command may get
the return value from the previous command with suitably puzzling results.

Without rewriting large sections of code, its not possible to avoid this problem.
It is better to increase the timeout to several seconds giving the server a chance
to respond and if it does timeout, hard exit since recovery is not possible with the
code base today.

I'd be happy to see the structure of this code improved but this quick fix at least
stops corrupted builds from happening which has to be a good thing.

(Bitbake rev: 410c11dd10736873f2dc587fbe9119c38831e693)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21 09:22:22 +00:00
Seth Bollinger cbdc81456b bitbake: knotty: Colorize knotty interactive console output
Add bold color output to log level name and standard color output to log msg
when bitbake is run from an iteractive console.  Color output is only
enabled
if the terminal supports color.

Used Jason Wessel's recommendation for transparency on verbose, note and
plain.

(Bitbake rev: 2734240da2cc150f811129a6adf6eb4b2161b204)

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:57 +00:00
Cristiana Voicu e3bda7f986 bitbake: hob: warnings during the build should be displayed in the Issues tab
Any issues encountered during the build (fatal or not) is displayed
in the Issues tab, and the total number of issues is changed.

[YOCTO #3376]
(Bitbake rev: 64c662ab7f09c2e867445e8ba21ea63ae014d45b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Richard Purdie 328f74a556 bitbake: runqueue: Allow partial setscene task coverage
When the setscene code was originally written it was thought that we'd
allow "partial" coverage. For example, if we just want to build the target
"bash:do_populate_sysroot" and its available from sstate, it makes no sense
to install gcc-cross's sstate package as its simply not needed.

Due to various other issues in the codebase, this functionality was
disabled/removed to allow the setscene code and sstate to stabilise and allow
us to concentrate on other problems.

The time has now come to enable "partial" coverage. There are two major changes
in this patch:

a) Creation of an unskippable list. This lists direct dependencies of
   build targets and hence things that cannot be skipped.

b) Addition of a handler which looks at a given setscene target and what depends
   on it and then decides whether its necessary.

(Bitbake rev: 2a937cd6a6c3110030b40bc4d85e349b85cb4db7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Richard Purdie 5de7744a49 bitbake: parse/cache/cooker: Preserve order in the file inclusion list
The data returned by get_file_depends() may me used in contexts like
checksums where order is important. The current usage of sets means
that some of the checksums can change in circumstances they should not.

This patch changes to use lists, thereby removing the problem.

(Bitbake rev: a44285fc4109236ab89f7aad0a1fc9220eec19b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:56 +00:00
Christopher Larson c176e5a3fe bitbake: knotty: kill duplicated import of 'time'
The duplicated import could result in an UnboundLocalError.

(Bitbake rev: a098cebd5c33ebd704efd35d9e655262283cbe1f)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 14:39:07 +00:00
Robert Yang 41125ddc86 bitbake: print clear message for "bitbake -e ASSUME_PROVIDED"
"bitbake -e ASSUME_PROVIDED" should fail, but the error message wasn't
clear enough in the past:

$ bitbake -e bzip2-native
[snip]
ERROR: Command execution failed: Traceback (most recent call last):
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 94, in
runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/command.py", line 323, in
showEnvironmentTarget
    command.cooker.showEnvironment(None, pkg)
  File "/buildarea/lyang1/poky/bitbake/lib/bb/cooker.py", line 325, in
showEnvironment
    fnid = taskdata.build_targets[targetid][0]
KeyError: 0
[snip]

With this patch, the massage will be:
[snip]
ERROR: bzip2-native is in ASSUME_PROVIDED
ERROR: Command execution failed: Exited with 1

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

[YOCTO #3392]

(Bitbake rev: f31447dac92454c822d4ebb7dd48e96c6c69dde4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13 14:21:16 +00:00
Cristiana Voicu 4e2b5a5929 bitbake: hob: hob was freezing because it doesn't receives well the log file
-after pressing "build image" button, hob was freezing because it didn't
receive well the log file

[YOCTO #3398]
(Bitbake rev: e3619e34d43c3f7725fc83c362d8cbd07e153ebe)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-13 14:11:24 +00:00
Christopher Larson c1c20c02a0 bitbake: command: add error to return of runCommand
Currently, command.py can return an error message from runCommand, due to
being unable to run the command, yet few of our UIs (just hob) can handle it
today. This can result in seeing a TypeError with traceback in certain rare
circumstances.

To resolve this, we need a clean way to get errors back from runCommand,
without having to isinstance() the return value. This implements such a thing
by making runCommand also return an error (or None if no error occurred).

As runCommand now has a method of returning errors, we can also alter the
getCmdLineAction bits such that the returned value is just the action, not an
additional message. If a sync command wants to return an error, it raises
CommandError(message), and the message will be passed to the caller
appropriately.

Example Usage:

    result, error = server.runCommand(...)
    if error:
        log.error('Unable to run command: %s' % error)
        return 1

(Bitbake rev: 717831b8315cb3904d9b590e633000bc897e8fb6)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:22 +00:00
Cristiana Voicu 99fa251b56 bitbake: hob: providing details about process state through porgress bar
-small changes to the text of the progress bar when parsing recipes

[YOCTO #3282]
(Bitbake rev: 90c0dfc39c3ce13e53c7c91168dc3401f7df476b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:22 +00:00
Richard Purdie e450b10c4c bitbake: bitbake/server: Remove dead console log code
This code is dead and doesn't do anything so lets remove it.

(Bitbake rev: 8d45739f49618757a5d7d79782deda355e3981ec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:21 +00:00
Richard Purdie f5acdd87bd bitbake: cooker.py: Don't dump the environment into the console log file
Dumping the environment data into the console log files directory is
invariably not what the user wants or expects and leads to confusion
when looking at the log directory.

This change forces the logs to be disabled by default when using
the -e option.

(Bitbake rev: 5d825b31d1133e41d3982db1b94f6a30a6fb99f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-01 11:46:21 +00:00
Richard Purdie 62651064d1 bitbake: uihelper: Set update flag when start event encountered
Its a minor correctness detail but the update flag should be set
when Start events are encountered.

(Bitbake rev: 96683ed68e11672ff22fb4a291d2628676c136f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30 16:55:40 +00:00
Richard Purdie 44c5d3dc84 bitbake: knotty: Ensure last tasks are disaplyed correctly in the footer
There was an issue where the last tasks run by bitbake would not
correctly get displayed in the knotty footer. This was due to the
total count including active tasks. This change ensures the footer
is displayed if the are any running tasks.

(Bitbake rev: d787e4efc106589811651bc18ca48d5223443b95)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30 16:55:39 +00:00
Cristiana Voicu 93c04c16e4 bitbake: hob: reordering the layers in the Hob Layers dialog
-since the order of the layers can potentially impact
the build outcome, users should be able to reorder
the layers within the layers dialog;
-used TreeView Drag and Drop

[YOCTO #3270]
(Bitbake rev: 2bd9a00facb90f7d76a9bdaa86ca765fb2159e71)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:55 +01:00
Cristian Iorga 30d1943a79 bitbake: hob/hig: Hob doesn't save properly proxy settings
User introduced proxy settings were not saved
when a proxy details input dialog was opened.
The proxy settings were lost upon return, and
restored from the previously stored one.

Also:
Code cleanup:
details_cb() function duplicate definition
removed

Fixes [YOCTO #3240]

(Bitbake rev: aa64b2e472f8a9713e3dc25647aa2cae474e2622)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:55 +01:00
Cristiana Voicu 55cdbd516d bitbake: hob: during recipe parsing, progress bar text provides details about the process state
- indicating on progress bar that hob has gone from parsing
recipes to "Generating dependency tree"; this will provide
some visibility of what has caused the "stop" button state
to change

[YOCTO #3282]
(Bitbake rev: d964d04ff1f59a590bd3ab5430517d79e92536d0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Cristiana Voicu a9c563b1b5 bitbake: hob: add a progress indicator when you select 'view log'
- created a new file named "hobthreads.py", defining a thread
for opening the log file in a subprocess using subprocess module;
in the future I think we will add some other threads here, to
implement some other performance issues
- on "builddetailspage", "packageselectionpage" and "imagedetailspage"
I have changed the manner for opening the log file; it uses the thread
to open the file, and on main thread it creates a dialog to show a
progress bar, which pulses till the file is open
- this was added because when the log file is big, it takes time to
be opened; on the dialog you can use "Cancel" button to terminate the
process initiated to open the file

[YOCTO #2997]
(Bitbake rev: 165362a63f085991b6bab63ab90a0c7b9bf6b784)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27 09:55:54 +01:00
Cristian Iorga 59943ca967 bitbake: bitbake: hob/builder: Hob crashes because of bad init
Image selection is not properly initialized to none,
and it used before having a chance to have a value.
Due to dynamic nature of Python, variable is used before
it exists, in this case. This causes a crash.
Bug introduced during the fix of [YOCTO #3228]

Fixes [YOCTO #3334]

(Bitbake rev: 1c540541c5397c38dca880a79df9ebfcda576d4c)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-25 17:50:19 +01:00
Cristiana Voicu 33440ee706 bitbake: hob/settings: add a scroll bar for the box with mirrors
- added a scroll bar in the shared state tab from settings
- added a signal on it, so when you add a new mirror, it will
auto-scroll to the end of the list

[YOCTO #3229]
(Bitbake rev: 00afd6a25c0cc0a4fcddd9f7c26a17ef6c47cbd2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristian Iorga 8cad1e343e bitbake: bitbake: hob/builder: Image selection is remembered while changing adv settings
Image selection is remembered correctly even after
advanced settings have been changed.
Selected image was reset even when it was not the case.

Fixes [YOCTO #3228]

(Bitbake rev: 93fb0a2c56100b2bbc8769af9ae2343c05e72193)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristiana Voicu a975e6bb19 bitbake: hob/builddetailspage: set "Log" page as default
- when you do a build you should see "Log" page, not
"Build configuration" page

[YOCTO #2569]

(Bitbake rev: 431cb80d4d5222f832f6141b8578291f2f14a131)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:08 +01:00
Cristiana Voicu 62e9f768cd bitbake: hob/imageconfigurationpage: progress bar shows when recipe parsing is stopped
-when the recipe parsing process is stopped, the progress bar shows
"Stopping recipe parsing"

[YOCTO #3259]
(Bitbake rev: d20626bd717bb8f5cfd73b91337af880198db247)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 21:13:07 +01:00