Commit Graph

2440 Commits

Author SHA1 Message Date
Valentin Popa 888d1f35ee bitbake: bitbake-worker: import needed signal module
bitbake-worker makes use of the signal module
but it doesn't import it. This patch fixes the issue.

[YOCTO #4750]

(Bitbake rev: c2ed639690f135994199eb24d964e37f57259e3a)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:59 +01:00
André Draszik d45486eb1c bitbake: fetch2: fix unpack of .xz files
If a file ends with .xz, it currently gets overwritten during unpack:
The decompress command for .xz files is:
  'xz -dc %s > %s' % (file, efile)
and as efile == file, we end up overwriting file (the source).

Fix this by adding .xz to the list of suffixes that that need to
be removed from a file name for an extract command, leaving the
bare file name. Now, for a given file foo.xz,
file == foo.xz and efile == foo, similar to how .gz .bz2 and .Z
files are treated.

(Bitbake rev: 2cd2d0a48e12ab4358fb967eaf7a56c17993f48d)

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:59 +01:00
Petter Mabäcker bd1c441a21 bitbake: bitbake: runqueue: add warning if invalidating invalid task
Add a warning if 'bitbake -C' is executed with a task that does not
exist.

Fixes [YOCTO #4877]

(Bitbake rev: 6459c1d0eb8f1007246df36149e2496ee531e25f)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:09 +01:00
Cristiana Voicu 0e9049a011 bitbake: hob: sstatemirror is standard also for file://.* regex
(Bitbake rev: 2e3c87569a8c40f7a2ebda22b01eee3bb7c96d1d)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:08 +01:00
Cristiana Voicu e28904e1de bitbake: hob: changed the split of SSTATE_MIRRORS variable
Until now the split made searching the string "file://", but
this is not ok when SSTATE_VARIABLE has the following form:
SSTATE_MIRRORS ?= "\
     file://.* http://someserver.tld/share/sstate/PATH \n \
     file://.* file:///some/local/dir/sstate/PATH"

In the documentation I've found that \n is the list separator.

[YOCTO #4857]
(Bitbake rev: 73bcd96928cb2df390e1fc6d3a8b7ce3e9d546a4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:08 +01:00
Robert Yang e605ecfd95 bitbake: providers.py: print a debug message for dynamic pacakge
We can't know the dynamic pacakge's name exactly, there might be a
problem, for example, when we use:

IMAGE_INSTALL_append += "ncurses-lib12344"

The ncurses-lib12344 matches ncurses' dynamic packages pattern:

PACKAGES_DYNAMIC = "^${PN}-lib.*"

so there is no errors before the rootfs creation though there is no
ncurses-lib12344.

We can warn this, but I think that we'd better not since there are many
dynamic packages, or there would be too many warnings, for example, the
perl and kernel modules, maybe we can print a debug message for it.

[YOCTO #4798]

(Bitbake rev: df372ca057f0c8c2152223b3e26ad9a30958bab6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 15:25:08 +01:00
Valentin Popa dc86293f04 bitbake: HOB:Proper handle of SIGINT
Modal dialogs doesn't run on the main loop so they cannot
catch any signal from the terminal. This patch makes sure
the dialogs are destroyed when a SIGINT is sent to HOB.

[YOCTO #3329]

(Bitbake rev: 6eee0cc37438cc3f91531b7df524330fba27161b)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-05 15:52:48 +01:00
Cristiana Voicu 8a186a6b38 bitbake: hob: save button from settings called a nonexisting method
The method was removed when the process for saving configuration
in Hob was changed. Replace the call with the right function.

[YOCTO #4793]
(Bitbake rev: b6aa2b63d71cbe82850a375381b2dbc750cf1905)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-03 08:13:35 +01:00
Richard Purdie 624160af6e bitbake: cookerdata: Improve message if BBPATH is unset and bblayers.conf not found
If BBPATH isn't set and bblayers.conf isn't found, improve the message
shown to the user to help their understanding of what the problem might
be.

[YOCTO #3271]

(Bitbake rev: 0e639f5cbc813c8d4719019cfdd4287e9a429610)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
A
2013-06-28 10:34:16 +01:00
Li Wang 10e44f162c bitbake: bitbake: python funcname can not include special character @
[YOCTO #4772]

When path:file change to python function, it maybe include '@' character.
So, add the special character to change to '_' for avoid error.

(Bitbake rev: 684bc6dcb11ecb1fd7a4d25c08909ad9879e8342)

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 10:06:09 +01:00
Cristiana Voicu 4852c4f6a1 bitbake: bitbake: adding a new comment should be placed on a new line
In this case, the comment is appended to the end of the file.
Some text editors, do not place  a '\n' to the end of the file
after saving it.

[YOCTO #4636]
(Bitbake rev: 2beb9589b1bd9773f587b4dc08afdfe50f4ea913)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-27 10:06:09 +01:00
Richard Purdie 011608a7b0 bitbake: data_smart: Fix bug with overrides and weak default values
(aka pay the cookie monster for weak defaults)

If you have code like:

MYVAR = "a"
MYVAR_override ??= "b"

then MYVAR will get the value "a" even when override is in OVERRIDES. The
reason is that the value of ??= is set as a flag not a value and the cookie
monster isn't paid.

The fix is to ensure appropriate payment is made for a defaultval varflag
matching the usual setVar case.

(Bitbake rev: 3d8044bc79c482c5ea008ddf12a8128dcd1527ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 13:00:57 +01:00
Richard Purdie 353212a533 bitbake: data_smart: Ensure variable flags are accounted for in config data hash
Currently if the flags set against a variable in the base data store
change, it doesn't automatically trigger a reparse when it really
should. For example with the blacklist class setting:

PNBLACKLIST[qemu] = "bar"
PNBLACKLIST[bash] = "foo"

will not trigger a reparse if only one entry is changed and a
blacklisted recipe can still be built.

I did consider using BB_SIGNATURE_EXCLUDE_FLAGS in here however it
doesn't make sense, we want to trigger a reparse when any of the
flags change too (which is different to the sstate signatures which
we wouldn't want to change in those cases).

[YOCTO #4627]

(Bitbake rev: ed74ea50043f6feb698c891e571feda2b9f8513d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-21 09:19:28 +01:00
Cristiana Voicu 78bcf871c6 bitbake: hob: save variables in conf/ directory
Until now the variables were saved in bitbake configuration,
now they are saved in configuration files, in order to be read by
bitbake-worker. This helps to assure the consistency for the rest
of the variables.

(Bitbake rev: ea65ebf43525f173205183aa2fd5d8db303ffd4a)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 16:26:22 +01:00
Cristiana Voicu f3246953c2 bitbake: hob: replace the init cooker with reset in order to keep the history
When the cooker initialization is called, the variables history is lost.
It need a reset, in order to load the configuration files.
Also, concatenated the value for INHERIT variable.

(Bitbake rev: 2b8c0c09e09ab69edc53501b84050c797f0686e4)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 16:26:22 +01:00
Cristiana Voicu 71520c5045 bitbake: bitbake: call the initConfiguration when reparsing
As it is implemented now, when parsing the configuration files is
needed, it also needs an initialization.
Also, implemented a function to create an extra configuration files
which can be used as postfile/prefiles when parsing.

(Bitbake rev: 5fe23c1b51da14f58f8c483f43f30b48766a0913)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 16:26:22 +01:00
Richard Purdie c5a5d23ec4 bitbake: cooker: Ensure configuration matches variable tracking state
When we reset, the current tracking value may change unexpectedly. This
patch ensures that the default value is preserved over a datastore reset.

(Bitbake rev: 0aa27598d9fdc8c3d18839b3ef93d0ba9698f761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 15:10:32 +01:00
Richard Purdie db6bd113d0 bitbake: build.py: Cleanup data store references
Clean up a number of old style accesses to the datastore.

(Bitbake rev: d872fef2c38749c3c6f5d84344db3ec2f9f134ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 15:10:32 +01:00
Cristiana Voicu 7d02de844c bitbake: bitbake: remove the function for reparse because it does nothing
The command for reparse does nothing, so I have managed to remove it,
because it can be misleading. When a reparse is needed, it can be used
the parse function.

(Bitbake rev: 188eaba121789112ffeb1188f0984d23dfe8df4f)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:29:53 +01:00
Peter Kjellerstedt 3a74f25cf1 bitbake: Correct a typo
(Bitbake rev: 087ec3a1b2dde04a8e5ce2943802fccd424ab3f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Peter Kjellerstedt d1ad98b64b bitbake: Allow checksums to be used for files retrieved using SFTP
(Bitbake rev: fd438a334d1f90ff07dded61c9648987da42c34f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Cristiana Voicu 77264ca2ea bitbake: hob: check if imageconfiguration page has the attribute 'warnings_bar'
[YOCTO #4571]
(Bitbake rev: 53c6b65bbcd5a6d3caed8581533f31ac373163a7)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Cristiana Voicu 01f9d1b338 bitbake: bitbake & hob: modify some commands and call them from hob
This patch adds a new command to create an extra configuration
file, in order to create it from Hob.
Also, it calls the enable/disable data tracking when needed.
Modified the prefiles and postfiles variables because the cooker
expects some lists.

(Bitbake rev: 92393701adcfa181a1090e3632bc6df7ee7852e6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:57 +01:00
Cristiana Voicu 64eda3e058 bitbake: hob: remove the rest of the old template functionality
Until now, some configuration settings was saved in a hob specific
directory. From now on, it will be saved in conf directory through bitbake.

(Bitbake rev: c53e902b010d1c3f1550f7e60e744f40120f73c2)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:26:56 +01:00
Richard Purdie 801fbe5a0c bitbake: fetch2: Enhance error message for BB_NO_NETWORK
BB_NO_NETWORK can be set by bitbake internally by the use of
BB_FETCH_PREMIRRORONLY so update the error message to give users a
hint about this.

[YOCTO #3222]

(Bitbake rev: cac3060d0bf8c7deeacda18d06d92787911380d0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:47 +01:00
Richard Purdie 5af68d42ba bitbake: runqueue/build: Add recideptask flag
Currently, tasks like fetchall are slightly broken since if a recipe
has specific [depends] which occur after do_fetch and add items not listed
in DEPENDS and RDEPENDS, they are not caught by recrdeptask. We've gone
around in circles on this issue (e.g
http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/runqueue.py?id=5fa6036d49ed7befe6ad50ec95c61a50aec48195
) and in many cases the behaviour of recrdepends is correct but tasks like
fetchall need the other behaviour.

To address this we add a recideptask flag which can be used in conjuction
with the recrdeptask flag to specify which task to to the inspection upon.
This means entries like do_rootfs[depends] which have do_fetch tasks are
caught and run.

I'm not 100% happy with needing another flag but I don't see any rational
way to get the correct behaviour in all cases without it.

[YOCTO #4597]

(Bitbake rev: f8c9b292b02ce2c28741b74901205f5e5807ca87)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-20 13:10:47 +01:00
Alexandru DAMIAN baff2630b3 bitbake: bitbake: read BBSERVER environement for remote server
This change allows bitbake to connect to a remote server
by reading the BBSERVER environment variable and effecting
the config. Basically a shortcut to the command line parameters.

(Bitbake rev: 81929f86c57ed0a4ad0cda7aaa820fceabaa61e9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:09:10 +01:00
Alexandru DAMIAN f5cadbe005 bitbake: knotty, bitbake: add option to terminate a remote server
I add an option to terminate a remote server gracefully
as not to need a kill command.

(Bitbake rev: 7495f835666a9561c2c7d84da7aaa74e4df55b9a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:09:10 +01:00
Alexandru DAMIAN 3ea9d647ec bitbake: knotty, xmlrpc: add observer-only mode
I add an observer only mode for the knotty UI and
the XMLRPC server that will allow the UI to register
a callback with a server in order to receive events.

The observer-UI is able to send read-only commands to the
server, and also is able to register as an event handler.

Read-only commands are the commands that do not change
the state of the server and have been marked as such in
the command module.

The observer can switch to a full client if it calls addClient
at any time, and the server has no other client running.

(Bitbake rev: 4de9ee21f1fa4d04937cc7430fb1fc8b7a8f61e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-17 16:09:10 +01:00
Richard Purdie e023620773 bitbake: utils: Fix multiprocessing pool reference
Interestingly the previous version comparision was broken and we were always using
the compatibility code, masking this bug. Oops.

(Bitbake rev: d48e8bcb24e8fa5d4fd60fd2c9927a95976d8d8b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 22:01:09 +01:00
Richard Purdie 441c699acb bitbake: compat/server/utils: Jettison pre python 2.7.3 workarounds
Now we've moved to require python 2.7.3, we can jettison the compatibility
workarounds/hacks for older python versions.

(Bitbake rev: a51c402304f2080a76720f9b31d6dfdbed393bba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 17:26:30 +01:00
Richard Purdie 6c058341f9 bitbake: runqueue: Improve handling of failing setscene tasks with hard dependencies
If a setscene task has a hard dependency on a task like pseudo-native, its
expected that the setscene task will not run unless the dependency is met.

This adds code to ensure that is the case, otherwise a bug would show up
with a usecase like:

bitbake gnome-common
bitbake pseudo-native -c cleansstate
bitbake gnome-common -c clean
bitbake gnome-common

With the double wrapper script environment, we'd not see issues like
this as it would be masked. The problem theoretically affects code like
useradd too as well as anything using a sstate postinstall.

(Bitbake rev: c54e738e2b5dc0d8e6fd8e93b284ed96e7a83051)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 17:08:40 +01:00
Alexandru DAMIAN 4aebdecdd7 bitbake: xmlrpc: removes the event servers controller
XMLRPC API ran a XMLRPC server at port+2 in order
to provide endpoints to register an event server
in which to dump the events.

This is no longer used, so we remove it.

(Bitbake rev: e171a363913a86e56266f4c9d107110c7f5221e3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 14:34:59 +01:00
Bogdan Marinescu 5aa5fc470e bitbake: bitbake: Add event mask flag support
Add a flag to event handlers which lists the events a given handler wishes to
process. By default event handlers recieve all events but this means
we can stop running code in many cases if we know it doesn't want the event.

This is part of the fix for YOCTO #3812, but implements filtering only
for class event handlers; the other part (events filter for UIs) will be
the subject of a different patch.

(Bitbake rev: 074003a4e7530a72863b9c685fc5c31b0f08c039)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:58 +01:00
Richard Purdie 542d6a87db bitbake: bitbake: Update version to 1.19.1
(Bitbake rev: 6acd444a557bba977ae1772371fdadf5f510e3b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:58 +01:00
Richard Purdie 8408f3dfca bitbake: bitbake: Bump minimum python version to 2.7.3
(Bitbake rev: a01d153a8baac7136c2797c95357e74dd8872026)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:57 +01:00
Richard Purdie 5ebd9bfff1 bitbake: prserv: Adapt autostart to bitbake-worker
With the change to bitbake-worker we need to ensure the workers know
how to contact the PR service, the magic 0 port and singleton is
no longer enough.

(Bitbake rev: c761751e259bb8e940552a28794b45887b5a72d9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:57 +01:00
Richard Purdie efb877bcdb bitbake: runqueue: Spawn a separate worker for fakeroot tasks
(Bitbake rev: 860ec42b220b7ed3f3bbe52c3546bba66644eac8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:57 +01:00
Richard Purdie 0ee02ca2fa bitbake: runqueue: Abstract the start and teardown worker functions
We're going to need a fakeroot/pseudo version of the worker so
abstract the code to start the worker process.

(Bitbake rev: b5d0f12f9df3ab211700473ed145ee6fbd9ca8e9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:57 +01:00
Richard Purdie 026c94be2e bitbake: runqueue: Move the bitbake-worker execution to a higher level
The worker was being executed by each execution queue so would get
constructed twice for each build. This is wasteful so move execution
to the main runqueue so we only have to start the worker once.

(Bitbake rev: 8117f8480125b121b2b5ac0afc31b108d9e670ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:56 +01:00
Richard Purdie d0f0e5d9e6 bitbake: runqueue: Split runqueue to use bitbake-worker
This is a pretty fundamental change to the way bitbake operates. It
splits out the task execution part of runqueue into a completely
separately exec'd process called bitbake-worker.

This means that the separate process has to build its own datastore and
that configuration needs to be passed from the cooker over to the
bitbake worker process.

Known issues:

* Hob is broken with this patch since it writes to the configuration
  and that configuration isn't preserved in bitbake-worker.
* We create a worker for setscene, then a new worker for the main task
  execution. This is wasteful but shouldn't be hard to fix.
* We probably send too much data over to bitbake-worker, need to
  see if we can streamline it.

These are issues which will be followed up in subsequent patches.

This patch sets the groundwork for the removal of the double bitbake
execution for psuedo which will be in a follow on patch.

(Bitbake rev: b2e26f1db28d74f2dd9df8ab4ed3b472503b9a5c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:56 +01:00
Richard Purdie cd7b7de91a bitbake: fetch2: Fix AUTOINC handling
AUTOINC was meant to appear once at the start of the version string.
The list of names may not be sorted meaning it could get inserted in
the middle. This patch simplifies the code and ensures it appears at
the start.

Include cache version bump to ensure the cache picks up these changes.

(Bitbake rev: ad8bf10d873abb94d987860a3f6d06b134fb8a99)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:52:56 +01:00
Richard Purdie b87429fdb4 bitbake: Add missing file that went out of sync
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-12 13:13:21 +01:00
Paul Eggleton 5128f0a846 bitbake: bitbake-layers: fix for move of data object to cooker
(Bitbake rev: 063ee01935767ac4c9518d7477c8c85da1c9969a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-10 10:32:58 +01:00
Paul Eggleton 8bdbb71f74 bitbake: tinfoil: fix for move of data attribute to cooker
(Bitbake rev: c400fe36f7609d53fb413484dc03bbce307f31f9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-10 10:32:58 +01:00
Paul Eggleton be78283e6c bitbake: lib/bb/cache.py: invalidate cache when file checksum entry no longer exists
Go through the cached list of file checksums and check if any of the
files no longer exist; if any are missing then invalidate the cached
recipe, which will force it to be reparsed and thus force the list of
files to be collected again. This prevents a warning when moving a file
to a different location that is still picked up by the recipe, e.g.
moving a file from a "files" subdirectory to one named with the recipe
name (${BPN}).

Fixes [YOCTO #4474].

(Bitbake rev: e1aa103593c46612c4d9000524174983b5994dc9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 17:09:26 +01:00
Richard Purdie 3e9456322d bitbake: cooker: Split data from configuration
The reasons for combining these objects is ancient history, it makes
sense to clean things up and separate them out now. This follows on
logically from the configuration cleansups and leads well into the
bitbake-worker changes.

(Bitbake rev: 89ffd62661ebcf2a97ce0c8dfd5e4d5bfbe27de7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:56:26 +01:00
Alexandru DAMIAN 0ac7a182aa bitbake: bitbake: Improve remote server handling
Two fixes in bitbake related to running remote servers -
* can now specify correctly the bind port
* the information in print conforms to common server infrastructure

(Bitbake rev: b657208ee15ae065e5fcc2dd6e0051e03d246727)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 14:13:18 +01:00
Alexandru DAMIAN f549cdd712 bitbake: xmlrpc: Allow server to remain memory resident
This patch enables the XMLRPC server to remain
resident in memory after a task is run, and to accept
a new controlling client. To check the server after
task completion, do

lsof bitbake.lock

in the build directory. Kill the server with kill.

(Bitbake rev: e823e1f0675ff3794eb39ef0b4df2d7a220f4013)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 14:13:18 +01:00
Alexandru DAMIAN 748e3c13c8 bitbake: bitbake server: create common server infrastructure
In an attempt to minimize code duplication, create
clear interfaces, and maximize code reuse through OOP,
bb.server adds base classes for the BitBakeServer,
BitBakeServerConnection and actual server implementations
instructed in particular server types.

These classes document the minimum interfaces that the
derived classes must implement, and provide boilerplate code.

Changes to None, Process and XMLRPC servers as to use
the common server infrastructure.

(Bitbake rev: 6db4a64cef20f8d0aba804db4c4e1eec7b112b46)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 14:13:18 +01:00
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