Commit Graph

3158 Commits

Author SHA1 Message Date
Alejandro Hernandez 505a6b696a bitbake: fetcher: fix BB_STRICT_CHECKSUM datatype check
Forcing strict to be a string, to avoid problems when performing comparisons

[YOCTO #6762]

(Bitbake rev: b8ed2098bdea2afd93ab4e3e1b834f3a31cb60de)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-06 16:09:53 +01:00
Alexandru DAMIAN 39ca8b429b bitbake: toastergui fix size rendering in dirinfo page
We fix the rendering of the size field in dirinfo-related pages
by directly calling filtered_filesizeformat and not rendering
it through the template engine.

Additionally, we enable error dumping into logs if an
Exception happens.

[YOCTO #6669]

(Bitbake rev: afa2431c21b8271b05dc4cca4265f98d9f338007)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 14:11:59 +01:00
Konrad Scherer e92e8009a1 bitbake: prserv/serv: Improve error message when prserver cannot bind to supplied host address
If localhost resolves to a remote address (due to a misconfigured network),
starting the pr server will fail without useful information.

To reproduce, add '<bogus ip> localhost' to /etc/hosts and run
'bitbake -p'. The error message will be:

ERROR: Timeout while attempting to communicate with bitbake server
ERROR: Could not connect to server False:

Running 'bitbake-prserv --host=localhost --port=0 --start' will fail with:

error: [Errno 99] Cannot assign requested address

Since these errors does not show the IP address of the attempted socket
binding, this results in a lot of wasted time looking at firewall rules, etc.

This patch results in the following error message if the socket binding fails:

PR Server unable to bind to <bogus ip>:0

(Bitbake rev: fae5914030bcf4c061c22fc61034c40c87b7121a)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie 438a508442 bitbake: hob: Fix sstate mirrors mangling
hob was adding the redundant characters "\1" in SSTATE_MIRRORS variable. If
needed it is expected the user will add this instead so remove the code
that was doing this.

[YOCTO #6600]

(Bitbake rev: 73bf120062fc00c7e26dc4e77a7d140658d89daf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie 8e4e03c2a3 bitbake: fetch: Extend testing of subdir unpack parameter and fix
This fixes urls of the form file://some/path/file;subdir=b. It also
adds in a couple of tests so we now tests these corner cases.

(Bitbake rev: 46306912a96444790efa9418d934dfdd36773ba1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Roxana 1f4e75143a bitbake: fetch: SRC_URI parameter "subdir" does not work for local files
Check if the 'subdir' parameter exists and assign it to 'destdir' so that
files are copied in ${WORKDIR}/destdir. This fixes urls that are of the form
file://a;subdir=b.

(Bitbake rev: 836a986b365eb9798563ec08d90b346596de7791)

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Ross Burton 249a0e937d bitbake: monitordisk: don't log when not monitoring a filesystem for inodes
Writing a log that the filesystem isn't being monitored for inode usage just
confuses users who are not aware about the nature of inodes in their filesystem,
so don't say anything, just silently disable the monitor.  In general this only
happens on filesystems which don't have a limit on inodes.

(Bitbake rev: ca93bc84ee5fb94a50c11c47e4d212d7da649e24)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29 12:08:48 +01:00
Richard Purdie c84b0c0b73 bitbake: bin/bitbake: Update to version 1.24.0
(Bitbake rev: 637ce8df2658e4905fab8a0600a45505596bf472)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 22:10:12 +01:00
Chad Nelson a94574f189 bitbake: fetch2/perforce: Use replace (1 line) instead of find (3 lines)
(Bitbake rev: 5bf5a937b26896bedbfea78dd1d62bce5a26ac2a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:21:12 +01:00
Chad Nelson 7ca8b65c3c bitbake: fetch2/perforce: Fix localfile name if labels are used
I could apply the label "release_1.0" to a super project that contains
many sub projects.  If my recipes have SRC_URI's that use that label but
grab different sub-folders, than there's a bug where the cached localfile
(tar.gz) will not be unique and reused at the wrong times.

SRC_URI = "p4://perforce::1234@//depot/SuperProject/MiniProjectAAA/...;label=release_1.0 \
                     p4://perforce::1234@//depot/SuperProject/MiniProjectBBB/...;label=release_1.0"

(Bitbake rev: 3b5b1703b77490116dda895b29737cea51a3d6a0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:21:11 +01:00
Richard Purdie ff5fba8462 bitbake: knotty: Ensure commandline parameters are updated in memres server
When using options like -k, -f, -v and so on with the memory resident
server, they'd currently only be set on the initial values passed to
the original command. This ensures they now match those specified
on the commandline for the options where this makes sense.

To make this work, a command to update the options on the server side
is required so this is added.

[YOCTO #5292]

(Bitbake rev: 1c75cc4d0c8b606c1fe76e6bf60bf6a32298b105)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-23 20:06:06 +01:00
Richard Purdie afdbe3112b bitbake: bitbake-worker: Fix bitbake -n
Without this you see:

File "bitbake/bin/bitbake-worker", line 201, in fork_off_task
    os._exit(child())
TypeError: an integer is required

(Bitbake rev: cd477b5e77ab0373248b8a8fa30e1c7b8ea984fd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-22 15:54:40 +01:00
Richard Purdie 7d80f8e946 bitbake: data_smart: Clarify what 'computed' means in the data store history context
(Bitbake rev: a2ca038dd1d0be4e0a0b20ae16a467d5a0075514)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-16 22:15:24 +01:00
Richard Purdie fceef0cace bitbake: data_smart: Fix remove operator and its interaction with data expansion
If you have:

FOO = "${bindir}/X Y"
FOO_remove = "${bindir}/X"

the expected result is "Y". Currently this doesn't work since the removed
expressions are not expanded first. This patch adjusts things so the
expressions are expanded before being processed for removal.

Also add a test to ensure this case continues to work.

[YOCTO #6624]

(Bitbake rev: 72a1ca4a104ccab73d6abcbd44db9c2636a58572)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-13 08:52:49 +01:00
Richard Purdie 51e392106e bitbake: bin/bitbake: Update to version 1.23.2
(Bitbake rev: e24095f54c52a547c0462836586a5d716249036e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 17:31:17 +01:00
Richard Purdie bb54fd0570 bitbake: siggen/runqueue/bitbake-worker: Improve siggen data transfer interface
We need to transfer some of the siggen data from the core/cooker into
the worker instances. There was a partial API created for this but
its ugly and its not possible to extend it from the siggen class.

This patch completes the interface/abstraction for the data and
means the class can extend/customise it in any siggen class.

(Bitbake rev: cf2d642052979d236185c5b8ca2c5478c06e62ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-11 17:31:17 +01:00
Paul Eggleton 1894522f35 bitbake: tinfoil: add a means of enabling variable history tracking
Unfortunately it seems like the external use of the cooker
enableDataTracking() function broke at some point since the code that
reads it now runs within BBCooker's constructor. Since this now has to
be done early, add a parameter to Tinfoil's constructor to allow
enabling variable history tracking.

Fixes [YOCTO #6676].

(Bitbake rev: a9439b136f55f3f0e80ff053cd3b159da69ba362)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Marius Avram dfbb546492 bitbake: toaster: fix some code spacing issues
Code is related to the basetable templates files.
It had mixed tabs and spaces and was miss aligned in various places,
making it hard to read.

(Bitbake rev: cdaea8951df6b707afd1fefbf22295088256dd6f)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Marius Avram 69e5cbdac5 bitbake: toaster: use cookies for count and sorting in templates tables
Until now cookies were used to save which columns were shown and which
were hidden in toaster tables. The tables from the templates also have
functionalities like sorting the entries on a certain column and
limiting the number of entries displayed on a page. The later however
were not saved using cookies. This patch brings this new feature.

The cookies are not saved only in the front-end. They are saved both
in the frontend in case the user uses the inputs/buttons to change
a parameter and also in the backend in case the user specifies manually
using GET variables the value of the parameters.

When no GET parameters are given the views will redirect the url to one
containg the parameters saved as cookies. When no cookies exist, default
values will be used.

[YOCTO #6126]

(Bitbake rev: 880b58c845e3a501fa90d24e1bd89c87ca84b709)

Signed-off-by: Marius Avram <marius.avram@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN a6f1e31721 bitbake: toaster: do not save objects in session
In order to avoid problems when using JSON serializer for
saving sessions, we move from storing the objects themselves
in the session to storing the object id and reloading the
object when retrieved.

This allows, for example, to use cookie-storage sessions if the
infrastructure owner so desires.

(Bitbake rev: 39d0f0c2e87d4b161f1eeaa2657e61b5a6bc9ee2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN 32a27931db bitbake: toaster: enable SSH-based remote build support
We enable support for starting builds on remote machines
through SSH. The support is limited to poky-based distributions.

We refactor localhost build support and we update
bldcontrol application tests to uniformely test the APIs
of localhost and SSH build controllers.

[YOCTO #6240]

(Bitbake rev: c2ad9c9bb83f61c171434324df8c4d5ee655a556)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:25 +01:00
Alexandru DAMIAN 5bd2b3f9a6 bitbake: toaster: bitbake server listen on all interface
We change the toaster starting script to make the
bitbake server listen on all interfaces on the local machine.

This is needed to be able to receive a controlling client
running on a remote machine.

(Bitbake rev: 137179eafca8d1a5a69b6302f8cc8961be3b45c4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:24 +01:00
Alexandru DAMIAN a287a6d9c1 bitbake: toaster: rename bldviewer projecttags custom tagset
We rename the projecttags in bldviewer.templatetags to
simple_projecttags in order to avoid conflict with the
similarly named tagset in toastergui.

The conflict leads to an intermittent bug where proper
tags are not read correctly since Django uses only the
module name as global tag library identificator.

(Bitbake rev: a37f2c194d7e59611177cb8755524b7ad702fe91)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-05 10:14:24 +01:00
Richard Purdie 83ebcb1f0c bitbake: process: Ensure abnormal exits set an error level
(Bitbake rev: 8f5c1cdae1ee6ce04ae0d04d0b95bd80efbf7534)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-02 18:10:37 +01:00
Dan McGregor 50a8400b72 bitbake: knotty: ignore interrupted system calls
With the improved exception handling added in an earlier commit bitbake
now stops when recieving a SIGWINCH. This happens frequently when
disconnecting and reconnecting tmux sessions and bitbake didn't survive.
Restore old behaviour of ignoring interrupted system calls but keep
proper exception handling for other errors.

(Bitbake rev: 418358a595c75f45b8d15160ec42bbe569562d91)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:33 +01:00
Alexandru DAMIAN 372c9d144e bitbake: toastergui: added pages for project details
We add new pages for the layer importing, layer details,
showing project builds and project configuration.

The pages are  in read-only mode, but they're needed as
to be able to verify the quality of data in the system.

Write capabilities will be added in a subsequent patch.

[YOCTO #6595]
[YOCTO #6590]
[YOCTO #6591]
[YOCTO #6588]
[YOCTO #6589]

(Bitbake rev: eed9ae5c2a2bd7567e12ae9a4f02a5a966a1e1a3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:33 +01:00
Alexandru DAMIAN acd4a1799d bitbake: toaster: add project pages for machines, targets, layers
We add new pages for the all-machines and all-targets
project-related views.

We update the existing template structure to create
a base project view, similar to a base build view, that includes
a breadcrumb.

Updating existing all layers view to use the new structure.

We update methods in the models to provide corrent
information display.

[YOCTO #6592]
[YOCTO #6593]

(Bitbake rev: 973f582a19441c1ec67061160e4c50ce03ed7b68)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 08:51:32 +01:00
Alexandru DAMIAN fe2e53ba30 bitbake: toaster: create Build methods for calculating progress and ETA
We move the code to calculate build progress as percent
and the ETA of the build to the model, so that they can be
reused across different pages.

(Bitbake rev: c2ced09e7ea4a1762d2788bb12a761734d20fd8e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 69955c7b42 bitbake: buildinfohelper: BuildRequest project file update soft linked
(Bitbake rev: 93887dadd5ee35557d320e96059c466d2e541065)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 25a715a119 bitbake: toatergui: update pages to match project models
We update pages and queries to match the new project
models.

(Bitbake rev: 8f47ec259106da714260c7388cee75a6c1f4622d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN ee250eb7e4 bitbake: toaster: update the bldcontrol to the new orm models
We update the build controller application to make proper
use of the bitbake specification in project settings.

Added heuristic to detect when the meta* layers and bitbake
are checked out from Yocto Project poky, and use a single
git checkout.

Building without a proper oe-init-build-env is not yet supported.

(Bitbake rev: 9eafe14956013f5af39b68fc93e1b03e7ea1f5c2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 95df54238b bitbake: toaster: update checksettings command for auto-detection
We enhance the checksettings command to try to automatically
detect settings for running on localhost.

The checksettings will look for a nearby poky layer source,
for a nearby build directory, and will try to import settings
from "toasterconf.json" files found in the local layer.

On new configuration, it will also perform updates from the
layer source.

(Bitbake rev: 2aab77dfccb538e2b09829841ea6c464d40cafb1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 565f69205f bitbake: toaster: add all layers page
We add a page where the user can browse
and import layers from all the layers known
by Toaster.

[YOCTO #6590]

(Bitbake rev: 59f4a9750a6c4f5360a91e3a4d1c03ceb42da086)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 3a4356dbfe bitbake: toaster: create project section navigation structure
We create the navigation structure for the project section.
This includes adding URLs for configuration, builds, all layers,
layer details and all targets pages.

Changes to existing pages to exemplify navigation links.

(Bitbake rev: 6f0cb9d106129eb496a4c009d95b0727378e97c1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 54530006b7 bitbake: toaster: enable admin interface on select models
We enable the admin interface in Toaster.

We add admin models for Build Environments (where the
sysadmin can configure where the builds take place)
and for Layer Sources (marking the upstream provider
for layer information).

The admin interface and associated data are enabled
only for the MANAGED version.

(Bitbake rev: 6618613c9210fb44d36d90f5f2404b435f10dfc8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 234226b905 bitbake: toaster: update orm models for layerindex compatibility
We add a ToasterSettings table that will keep
installation-wide settings.

We update the models for the layer-related data storage to
make them compatible with the layerindex application API.

We add a LayerSource class that can update local data from
a LayerIndex-like compatible API.

Adding a command line option to perform information update
from all upstream layer sources.

Fair warning - there is no backward migration from 0013.

(Bitbake rev: 89e13579e1b44b738f10fadec8454aa0e6f073af)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 10019a652f bitbake: toaster: fix application discovery in settings.py
We fix application discovery, tuples don't have .append().

Other minor fixes.

(Bitbake rev: a6f18aac3e6bb448d89a3425a2f756c6514ee595)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:49 +01:00
Alexandru DAMIAN 7eb3e45a33 bitbake: toasterui: refactor log saving and save out-of-build errors
We refactor log saving to go through only one code path.

All logs that happened outside the build (i.e. before build
starting) now will be logged to either toaster_ui.log if the
build command ran in interactive mode, or to the build request
errors if the command ran in managed mode.

This enables proper display of error logs in project page.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:48 +01:00
Richard Purdie 669c07d602 bitbake: build/data: Write out more complete python run files
Currently the output in the python task/function run files is rather
incomplete and effectively useless. This enhances the code to take
advantage of the bitbake's dependency tracking and extend the output to
include dependencies. This makes the files more usable for debugging
purposes. Since this only happens at python function execution time, the
overhead is minimal in the grand scheme of things.

(Bitbake rev: 02667e048c3e632f857c87177c0022eaf5481802)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie 34226b82da bitbake: bitbake-worker: Extra profiling data dump
Currently we get no profiling oversight into either the main bitbake worker
process, or the overall parsing before task execution. This adds in extra
profiling hooks so we can truly capture all parts of bitbake's execution
into the profile data.

To do this we modify the 'magic' value passed to bitbake-worker to trigger
the profiling, before the configuration data is sent over to the worker.

(Bitbake rev: 446e490bf485b712e5cee733dab5805254cdcad0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie ac66e15f5c bitbake: utils: Improve profile log processing
This stream redirection of stdout is horrible. pstats takes a stream argument
so lets use that instead.

(Bitbake rev: 93d155f4766e27e7b004d13569aa03961fe89e3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie c79b7f06af bitbake: fetch2/hg: Fix username/password handling
We should only add user/password options if they're specified as in the
fetch case. Patch from Volker Vogelhuber <v.vogelhuber@digitalendoscopy.de>

(Bitbake rev: 303e6256947f4df4f283b75b7ccfdffa72864d67)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Richard Purdie d1a133a670 bitbake: runqueue: Fix setscene tasks not running
Currently, if you have hard dependencies between setscene tasks (like avahi on
base-passwd through useradd.bbclass), other dependencies may not be installed
even if these exist in sstate. For example, avahi -> expat -> pigz-native
(and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate
bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in
sstate. The fix for this is to continue to iterate dependency chains
around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

(Bitbake rev: f787957a224e8c2682a19e5c4a4d9c86bdce52ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:45 +01:00
Robert P. J. Day 6d08e5bb09 bitbake: lib/bb/*.py: Typo fixes/grammar/comment fixes, nothing functional.
(Bitbake rev: 587b144ee409d444494d8d7f2d1c53ede8f7c953)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Olof Johansson 91083de4cb bitbake: depexp: don't use undefined variable 'logging'
This fixes an issue when trying to use depexp without specifying a
recipe. Before change:

  $ bitbake -g -udepexp
  Traceback (most recent call last):
    File ".../bitbake/bin/bitbake", line 382, in <module>
      ret = main()
    File ".../bitbake/bin/bitbake", line 370, in main
      return ui_module.main(server_connection.connection, server_connection.events, configParams)
    File ".../bitbake/lib/bb/ui/depexp.py", line 201, in main
      logger.error(cmdline['msg'])
  NameError: global name 'logger' is not defined

After change:

  $ bitbake -g -udepexp
  Please specify a package name for dependency graph generation.

(Bitbake rev: 984ad90b2f1e29634dc79803a4a0404ab0534039)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-25 08:57:45 +01:00
Bernhard Reutner-Fischer 21f41f6c43 bitbake: cooker: tweak CookerCollectFiles::find_bbfiles
since python-2.5 string.endswith() takes a tuple

(Bitbake rev: 86a67a1fd4244da9343dbf14deed1ad0d3003f32)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 23:02:00 +01:00
Richard Purdie 5a3a7e0f74 bitbake: siggen: Fix a subtle bug in hash calculation for shared work tasks
With a shared work task like gcc, the task can be run from a variety of
different recipes which may have different virtual extensions in place.

Depending on whether gcc-runtime or nativesdk-gcc-runtime's do_preconfigure
task is called for example will change the sorting of the task hashes due
to the way clean_basename currently works.

The correct thing to do here is sort on the base filename first, then any
extension when ordering the hashes. This means we do account for things
like recipes with both a native and non-native dependency but we also fix
the shared work case where we don't care whether it was a virtual version
or not.

(Bitbake rev: 2e80b5d10a5037ed6f0bc227a1f9b42529c87086)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie d33cc89e53 bitbake: process: Further improve robustness against server shutdown
Currently, if an exception occurs in an event handler, the server shuts
down but the UI simply hangs. This happens in two places, firstly waiting
for events and secondly, sending events to a server which no longer exists.

The latter does time out, the former does not. These patches improve
both code sections to check if the main server process is alive and if not,
trigger things to shut down gracefully. This avoids the timeout in the
command sending case too.

This resolves various cases where the UI would simply hang indefintely.

(Bitbake rev: ac418e1112ff5f9c3157569316902f7a27fba4b4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie 8683c244c1 bitbake: utils: Add workaround for multiprocessing bug
Our usage of multitprocessing is problematic. In particular, there is a bug
in python 2.7 multiprocessing where signals are not handled until command
completion instead of immediately.

This adds a workaround into our wrapper function to deal with the issue.

(Bitbake rev: a16185e602b39b71475aa7e9ee80ad2b1f28d0f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00
Richard Purdie ecf72a7132 bitbake: command: Trigger updateCache to shut down any active parser threads
If we trigger a shutdown whilst parsing for whatever reason, in some
cases we were not closing down the parser threads. This change
ensures we do so. The function names are not entirely intuitive
but the behaviour is more correct (and commented). The previous bug
with the stdout failure would trigger this one, if there was a cold
cache and parsing was required (but not otherwise).

(Bitbake rev: 25bfa2478f1c3a8eb695e1e5760e06db5be8f2fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23 09:31:42 +01:00