Commit Graph

1923 Commits

Author SHA1 Message Date
Richard Purdie a8edf79fce bitbake: fetch2/git: Don't use deprecated API
(Bitbake rev: 8e650b3307b60cfe8e7439ea6891c3a85f785af9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 15:55:57 +01:00
Cristiana Voicu e8738b83b7 bitbake: hob/packageselectionpage:cancel button should redirect to Image conf screen
Cancel button brings you to Image configuration page.

[YOCTO #3105]
(Bitbake rev: 88cd9586f0f6a413c1a6800b3e57444f453afb73)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 13:39:46 +01:00
Cristiana Voicu a0bdb64a18 bitbake: hob/builddetailspage: change tooltips and remove a dialog from "Build stopped" message
When you stop a build, a "Build stopped" message appears. I have changed 2 tooltips and
also eliminate the alert that comes up when you click 'Edit packages'.

[YOCTO #3160]
(Bitbake rev: f5a21da2faf7ede56cf211b96dffd8aaa4b485b8)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-25 13:39:46 +01:00
Jason Wessel 98ac5e4e62 bitbake: event.py, knotty.py, ncurses.py, runningbuild.py: Add support for LogExecTTY event
The LogExecTTY even is intended to provide the ability to spawn a task
on a the controlling tty, if a tty is availble.  When a controlling
tty is not availble the previous behavior is preserved where a warning
is issued about the action an end user must execute.

All the available UI's were tested against the new event type.

This feature is primarily intended for hooking up a screen client
session automatically on the controlling tty to allow for a more
streamlined end user experience when using a pure command line driven
environment.  The changes that send the LogExecTTY event are in the
oe-core side.

(Bitbake rev: cffe80d82a46aaf52ff4a7b6409435754043553f)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:32 +01:00
Jason Wessel eab93b0d62 bitbake: progress.py: Fix traceback when running goggle ui
The following traceback appears when running the following command after the
devshell is exited.

bitbake -u goggle -c devshell busybox

-- traceback --
Traceback (most recent call last):
  File "/work/bitbake/lib/bb/ui/goggle.py", line 35, in event_handle_idle_func
    build.handle_event (event, pbar)
  File "/work/bitbake/lib/bb/ui/crumbs/runningbuild.py", line 299, in handle_event
    pbar.set_text(event.msg)
AttributeError: 'ProgressBar' object has no attribute 'set_text'

(Bitbake rev: a6cc53cdb3c34fc8fd01bbc5ce0008429dc6785c)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:31 +01:00
Jason Wessel eed98e4666 bitbake: runqueue: Add --no-setscene to skip all setscene tasks
Mainly intended for the purpose of debugging or forcing builds
from source, the --no-setscene will prevent any setscene
tasks from running.

(Bitbake rev: 440e479f3e248482c38c149643403c6907ac7034)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:31 +01:00
Richard Purdie e1c1ee19e0 bitbake: fetch2/git: Add missing mkdir
bitbake-selftest is failing due to directories not being created. This adds in an
appropriate mkdir so the tests can complete. Presumably in general OE use, something
else is ensuring the parent directory is created.

(Bitbake rev: 1270a07713e2a6c6e6fadcc61b785aebc99ae17b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 90b7683f78 bitbake: fetch2: improve error output for checksum failures
* Don't print the full exception in the initial warning - if we later
  succeed in fetching the file from a mirror, we won't usually need the
  details (which are in the fetch log if they are needed); otherwise the
  full error will be printed when the fetch operation fails. Also adjust
  the conditional block so that we don't print another warning just
  mentioning we're going to try mirrors.
* Call logger.error() so that with knotty the full log is not printed
* Provide an explanation around the lines we print for easily updating
  the checksums in the recipe. We don't want users to be just blindly
  updating the recipe in case of a transient failure or deliberately
  altered remote file.

(Bitbake rev: 2793413106c925b06783beb7413aa87cbcf246c3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 683d3b9cfb bitbake: fetch2: make fetch failure errors more readable
Most of the time we don't need to see the fetch command; the fetch log
includes the command as a debug message in any case, so omit it. Also
adjust the way command output is printed (we don't need stderr/stdout
labelled, and print "no output" instead of "output:\nNone" when there is
no output.

(Bitbake rev: a75505a52e4da918222100221f79e8a658f90446)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:52 +01:00
Paul Eggleton 0bdde689f6 bitbake: lib/bb/runqueue.py: fix exceptions with -k and failed targets
If a target dependency is marked as failed and yet we are continuing on
because -k has been specified, don't try to access the dependency's data
in taskData.build_targets since it will have been removed. This fixes
"IndexError: list index out of range" errors in this situation.

Also, do not print the "unhandled exception" message when SystemExit is
raised since we will have reported the actual error already in this
case (e.g. when -k has been specified and some targets failed).

Fixes [YOCTO #3133].

(Bitbake rev: 70eebc184eb1ab3678be87bed019b5beadecdc89)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:51 +01:00
Paul Eggleton 1c2634c8d2 bitbake: hob: fix Gtk-WARNINGs due to invalid markup on Back button
You can't use markup characters (e.g '<' or '>') in the labels for many
widgets - you must use the appropriate entities instead.

(Bitbake rev: 54a16ac999d4a2c4c3f8a4531e8c6fabc39a4147)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:51 +01:00
Paul Eggleton c46c5605fe bitbake: hob: remove confirmation dialog on close
This is not necessary for modern applications - instead we just need to
check if we're in the middle of a build and if so, do the same thing as
pressing the "Stop" button.

(Bitbake rev: a79eb5d918239db1dade8134743e6142a4854930)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Paul Eggleton bf567b14a8 bitbake: hob: allow configuring default machine using HOB_MACHINE
Allow specifying HOB_MACHINE in local.conf to set the initially
selected machine. With this set, Hob will select the specified machine
and then jump straight into parsing recipes. If you do wish to change
the selected machine with HOB_MACHINE set you still can - you just need
to stop the parsing process first.

Fixes [YOCTO #3148].

(Bitbake rev: c3b623dc7d546a1ededdb532dcbcba4a6230bc65)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Paul Eggleton 991557216e bitbake: hob: don't show error dialog for errors during building
During building we already report errors in a special tab and
indicate when the build has failed; bringing up a dialog was a
regression introduced in bitbake revision
5bab81b124087d63d6eb62a861e1241714fcd483.

Fixes [YOCTO #3151].

(Bitbake rev: cf0a67d62f631aa48d1afc3fbdd0f73995b1c401)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:50 +01:00
Constantin Musca d875d62f8e bitbake: hob: The title of the packages screen depends on the screen you arrive from
- If you arrive to the packages screen from the recipes screen, the title
should say: 'Step 2 of 2: Edit packages'
- If you arrive to the packages screen from the image details screen, the
title should say: 'Edit packages'
- The title of the recipes screen should say 'Step 1 of 2: Edit recipes'

[YOCTO #2982]

(Bitbake rev: c366f4314c29b873a486daa9a0a4e29bb4225dd6)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 12:13:49 +01:00
Ross Burton 936d18a6cb bitbake: hob: Don't set busy cursor on the root window, just our window
[ YOCTO #3127 ]

(Bitbake rev: 5ef9d98b343b9ed05167e5471eb9f7f12e97b045)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 12:05:15 +01:00
Cristiana Voicu c0c04a5404 bitbake: hob: add a top bar when building process is stopped
When a build was stopped, it wasn't obvious what to do next.
Now, on the page it appers a top bar with 3 buttons: "edit image",
"open log", "build new image"

[YOCTO #2537]
(Bitbake rev: a6afd15b7a40919313e26777b514ae44b587a0f6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 12:05:15 +01:00
Trevor Woerner f77488e565 bitbake: cooker: Clarify package/recipe wording
When the '-s' option is run, change the heading above the list of recipes
to say "Recipe Name" instead of "Package Name".

(Bitbake rev: d1c3a9de875fb488a56ab5cb1d2f8e2f24f31d69)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:56:32 +01:00
Cristiana Voicu 1e8b535695 bitbake: hob/packageselectionpage: "Cancel" button returns to "Image configuration" screen
Once package building completes, you can customise the list of
packages that will go into the final image. Once you have made
the changes you need, you can either build your image, or you
can exit the process and go back to the 'Image configuration'
screen by selecting 'Cancel'.

[YOCTO #3105]
(Bitbake rev: c5fd1824c9794923576ec1e747536c0430542fd1)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:56:31 +01:00
Paul Eggleton 14a04abb9b bitbake: hob: report event handler failures
If an event handler failed we were not recieving an error message -
parsing just "froze" at 99%. This is because we were expecting a
CommandFailure event and this never happened in the case of
RequestPackageInfo which is where the failure was occurring.

This also required tweaking the error formatting slightly, taking the
return value of the format function rather than the message property
since the latter only seems to contain the first line without the
traceback in the case of event handler failure. Other error cases were
tested and their message formatting is unaffected by this change.

Final part of the fix for [YOCTO #2651].

(Bitbake rev: 5bab81b124087d63d6eb62a861e1241714fcd483)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:39 +01:00
Bogdan Marinescu 8d46be8a0d bitbake: hob/settings: Remove stray "distro" combobox from simple settings
The "distro" combobox was moved to advanced settings, but it
was also present in simple settings. This patch removed it
from simple settings.

(Bitbake rev: 6d56bec4464da14d7fde0e60946be43293ad6e52)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:38 +01:00
Richard Purdie d485d0b0e8 bitbake: build/siggen: Add support for stamp 'clean' masks
Currently when we execute a task, we don't remove other potentially stale
stamps. This can mean if you switch between two different versions of a
recipe without a clean, the build can get very confused.

This patch adds in functionality to allow a wildcard expression of stamp
files to be removed when creating a new stamp file. This patch adds in
the core of the code to enable this but it also requires metadata support
to enable it.

When writing this improvement I went through several different options but
this was the only way I could find to allow things like noexec tasks to
function correctly (where stamps need to be created without the data store).

[YOCTO #2961]

(Bitbake rev: e026469b307522e5b6a680e0ae5587749d33dcae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:48:38 +01:00
Richard Purdie a4fd77db84 bitbake: fetch2/cvs: Fix parameter spacing
Add in misssing space between the parameters. Reported by
Jate Sujjavanich <Jate.Sujjavanich@myfuelmaster.com>.

(Bitbake rev: 55382f0aac84b8f81cad0b82053c0b8295c33e54)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:17 +01:00
Richard Purdie 01606f2b97 bitbake: fetch2/cvs: Clean up various data store references
The code in the CVS fetcher is elderly and there are simpler ways of
using the data store. This updates to use the modern APIs.

(Bitbake rev: 78eee8c70a80997293df99475153aed0b2ad0a17)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:16 +01:00
Richard Purdie 553a5b1842 bitbake: fetch2/cvs: Fix localdata variable reference
The localdata variable was removed, fix up a lost reference to this.

(Bitbake rev: 02ccc1396005ce0b7a2150a5ce12b723df21d464)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 11:37:16 +01:00
Bogdan Marinescu 05c1d32e02 bitbake: hob: Fix settings dialog issues
Fix some issues with the settings dialog that were introduced as
a result of merging the fix for #2162.

[YOCTO #3117]

(Bitbake rev: a363f59579e01cb7bd39be2ce73f22c875c62ce7)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Constantin Musca 8c82b12d1c bitbake: hob: rename 'View log' to 'Open log'
Rename all the 'View log' buttons to 'Open log' for
consistency.

[YOCTO #3045]

(Bitbake rev: 7bc9b0c1c2544b494959b13ac79ac3e52edb4fe3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Christopher Larson 749f4f6744 bitbake: compat, event: use OrderedDict from py2.7 for the event handlers
This ensures that our event handlers get run in registration order, making the
behavior more deterministic. I pulled in the python2.7 OrderedDict to avoid
essentially reimplementing a version of it ourselves, figuring we can drop it
when we bump our required python version next.

(Bitbake rev: 44aa0b0537d3fbd1272015e7677948f84d8c0607)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-20 10:29:33 +01:00
Valentin Popa b3ba9eb7e2 bitbake: Implement 'settings' dialog as designed
[YOCTO #2162]

(Bitbake rev: ac75b06744e73399ca1fbda322ef851ae5754b0a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:36 +01:00
Richard Purdie 149c121209 bitbake: cooker: Fix priority for virtual recipes
When making filename comparisons for recipes for priority calculations,
we need to split off any virtual prefix. Without this, BBCLASSEXTEND
version of recipes don't follow the priority settings they should.

[YOCTO #2933]

(Bitbake rev: 055b72a230e6b0b1cababd65372c62d9ddce385e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:36 +01:00
Constantin Musca 293764e435 bitbake: hob/builddetailspage: Add tooltips to the build failed notification
[YOCTO #3046]

(Bitbake rev: 69ad4ebd1379e804d0753bd4ee704b602b5efcc4)

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:35 +01:00
Paul Eggleton 5b53671f27 bitbake: lib/bb/event: improve handling of event queue on exit
If BitBake exits before a UI handler (server) has been registered, we
print the event queue; if there are any errors or other non-debug
messages just print these and suppress the rest of the message queue.

This improves the output when sanity check failures occur with OE-Core
by avoiding printing a long stream of uninformative debug messages.

(Bitbake rev: 8668a94cb1841798636b68fe123400d6b81f6574)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:34 +01:00
Paul Eggleton 537dd88c1a bitbake: hob: format error messages properly
Error messages that use arguments need to be formatted properly, or we
don't get the full message. Use a formatter to do this when an error
occurs.

Partial fix for [YOCTO #2983].

(Bitbake rev: 6783538884adecd914909a9ab4ca73c27575f3ad)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Cristiana Voicu 831486844d bitbake: hob/imagedetailspage: change "FileCreated" label to "Files created"
[YOCTO #2998]

(Bitbake rev: ca2464561d54d59d1146359e41eb08201954fc21)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Jessica Zhang 043ab5433f bitbake: Fixed hob proxy tab tooltip text per review suggestions [YOCTO #2499]
(Bitbake rev: 485e69d41e220ed4e8efc89a357a8d395e44da9f)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:33 +01:00
Paul Eggleton 78b14140d6 bitbake: hob: sort base image drop-down list
Sort the list of base images to make it easier to find a specific image
in the list. Note that "Create your own image" still remains the last
item in the list.

(Bitbake rev: db16f575a774de7d9d44b4bc727b252de5d0f34d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Paul Eggleton 34cacbf186 bitbake: lib/bb/command.py: ensure setVariable only sets values as strings
This is the interface Hob uses to set variable values in many instances,
and at the moment it is possible that some of the values it passes are
not strings. If a non-string value gets into the datastore it can
trigger exceptions during parsing when we attempt to expand the variable
and substitute in the non-string value.

This fixes using the meta-ti layer within Hob - it currently has a
reference to BB_NUMBER_THREADS within a shell function and since this
is a variable that Hob was setting from its configuration as an integer,
due to the above this was triggering an ExpansionError.

Fixes [YOCTO #2875].

(Bitbake rev: 855b71d8a8e468bfeff9e1a6699d79d68ab27aa1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Paul Eggleton beb6815226 bitbake: hob: don't reorder layers list
We cannot reorder this list - it must stay in the order shown in the
dialog (which may in future be configurable by the user).

Fixes [YOCTO #2649].

(Bitbake rev: eca0352195d2d8ae8ef15baab9737884ec674a46)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-14 09:50:32 +01:00
Cristiana Voicu 2cbf4e60a3 bitbake: hob/packageselectionpage: restore selected packages
After "Cancel" action, selected packages are restored to default.

[YOCTO #2984]
(Bitbake rev: 81b0c0cd15cbd61285e6525f482412051371ea4c)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:45 +01:00
Paul Eggleton 1b1b83651a bitbake: hob: rename task -> packagegroup in recipe selection
This changes the filtering to use the inheritance of
packagegroup.bbclass to determine if a recipe is a package group.

Also makes the tab tooltip text generic; these recipes could come from
any enabled layer, not just the default ones.

(Bitbake rev: a3bf87a90198bf6127663c27d8be086dab04aaf9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:45 +01:00
Paul Eggleton 5f40b7a29b bitbake: hob: ensure error message text is properly escaped
Our poor implementation of markup escaping was causing invalid
markup, leading to the error dialog being blank. Use the glib markup
escaping function provided by PyGTK+ to do this properly and avoid the
blank error dialogs.

Partial fix for [YOCTO #2983].

(Bitbake rev: 563ea5233a5ab1629c51e802d04280692f96c596)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:44 +01:00
Paul Eggleton 4ec3d72072 bitbake: hob: use correct semantics for dealing with pkgdata
Some of these values may or may not be overridden on a per-package
basis, so handle them accordingly.

(Bitbake rev: 56cee6a958843b03c5389d4a45245a04d1e03327)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:54:44 +01:00
Richard Purdie fb44773f61 bitbake: tinfoil: Add file inadvertently not committed
(Bitbake rev: 44a3fb49e817be641090d5d1bce7b586af407d71)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 21:50:41 +01:00
Paul Eggleton 21816355c0 bitbake: cooker: fix handling of exceptions during exception handling
If an exception occurs during handling another exception we were
getting a useless traceback such as the following, after which
BitBake froze:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/user/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1207, in updateCache
    if not self.parser.parse_next():
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1694, in parse_next
    logger.error('Unable to parse %s', value.recipe,
AttributeError: 'exceptions.TypeError' object has no attribute 'recipe'

Fix this to print an actual traceback of the exception and exit
gracefully (well, as gracefully as possible under the circumstances).

The general fix for [YOCTO #2977].

(Bitbake rev: 675b237a284dff84e972546774b69e2f89afb360)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Paul Eggleton 4d8ba9a0ec bitbake: fetch2: fix malformed URL causing a useless traceback
The implementation of NoMethodError and MalformedUrl was broken - if you
just set self.args in an exception class to a string it treats it as a
list and then fails later on with a TypeError due to the number of
arguments not matching up.

This nasty exception during exception handling was breaking the normal
exception flow (fixed separately), which meant that if you had a
malformed URL or invalid protocol in SRC_URI you would get the
following:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/user/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1207, in updateCache
    if not self.parser.parse_next():
  File "/home/user/poky/poky/bitbake/lib/bb/cooker.py", line 1694, in parse_next
    logger.error('Unable to parse %s', value.recipe,
AttributeError: 'exceptions.TypeError' object has no attribute 'recipe'

A specific fix for [YOCTO #2977].

(Bitbake rev: 9d4150d99051d24ff218e8a43664ceaf524b19c7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Cristiana Voicu e843d56a31 bitbake: hob/imageconfigurationpage: remove or_label reference
When or_label was removed, I forgot to remove also the references to it.

[YOCTO #3010]

(Bitbake rev: 4d208aaedd60f79a4277f501fdbf8c2afc32c250)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:14:08 +01:00
Paul Eggleton 5343cdb20e bitbake: fetch2: replace double slashes in paths in encodeurl()
This ensures that if all a MIRRORS entry does is add a slash, this does
not result in a circular loop.

Fixes [YOCTO #3073].

(Bitbake rev: 57055d337a2c9997a6e5d5bdabaec396e3e128e9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 14:50:04 +01:00
Cristiana Voicu 572851887e bitbake: hob: print message when DISPLAY is not set
If DISPLAY wasn't set, launching hob has printed a traceback
difficult to understand. Now, the exception is caught and it
shows a human message.

[YOCTO #2596]

(Bitbake rev: a41098a2dacbd903422ccdcd1885b0f351c7ddf3)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 14:43:51 +01:00
Liming An 95ae927dfc bitbake: Hob: change view of 'recipes' and 'packages' tables as ui design
changed the order of task tables,
cancel the 'description' column,
add the binb total number indicator, and so on

[YOCTO 2195]

(Bitbake rev: 6dc3263d60a6d35f9eebfcdbc2665201ee40b953)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:13:53 +01:00
Paul Eggleton e58eb8cbb0 bitbake: bitbake-diffsigs: allow specifying task & follow deps recursively
Add the ability to compare the two most recent runs of a specified task,
and follow dependent hash changes recursively. This enables you to trace
back and find exactly why a task was re-run after the fact.

Note that this relies on the metadata providing a function, hooked in
as bb.siggen.find_siginfo, which allows searching in the appropriate
places to find signature data files.

(Bitbake rev: cc70181659c07e04c205e17832846acf1ff31d28)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:45 +01:00
Paul Eggleton d5226c96d3 bitbake: lib/bb/siggen.py: make signature dump/compare functions return a list
These functions become a little bit more reusable if they return a list
containing the output rather than just printing it.

(Bitbake rev: a0ad2a947b71abcc0a1244cf139b9e9dfd8ee049)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Paul Eggleton 19d0abe14c bitbake: lib/bb/siggen.py: insert a colon between class and recipe name
before:
  virtual:nativeautomake_1.12.1.bb.do_compile
after:
  virtual:native:automake_1.12.1.bb.do_compile

This separation ensures that the key is readable, and if necessary,
parsable.

Unfortunately this invalidates previous native sstate signatures with
OE-Core - not much that can be done about that; however that occurs
frequently during the development cycle so it's par for the course.

(Bitbake rev: 5b96c32dad256090e9bda5af0f80c7dbcc90bde8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Paul Eggleton b7bd852db1 bitbake: lib/bb/siggen: replace tabs with spaces
We had one section of the code mixing tabs with spaces, which is
particularly undesirable with python code.

(Bitbake rev: 8eaa093b179e03a6003a47220540b1bc73afca17)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:44 +01:00
Bogdan Marinescu e8d87846e3 bitbake: crumbs/hig: Save toolchain in settings
Toolchain was not saved in the settings dialog ("Output" tab).

[YOCTO #2695]

(Bitbake rev: f8924b75d6ff7f093d73f4e3c0953e349960d5ff)

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Cristiana Voicu e2b0eaef93 bitbake: hob: The 'run image' and 'deploy image' dialogs text and alignment corrections
-changed the text shown by both dialogs text
-make small tweaks to alignment

[YOCTO #2999]

(Bitbake rev: b193db13472908b8ec6c670da96ff3b0004e635b)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Cristiana Voicu ed17f44da6 bitbake: hob/imagedetailspage: "Image ready" icon appers only after the image was generated
Now, "Your image is ready" icon doesn't appear when you come back on Imagedetails
page. It appears only after the image was generated.

[YOCTO #2984]

(Bitbake rev: de29bfc163471e4959483493a5e5b26f8a2cf8a0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:43 +01:00
Ioana Grigoropol 40d55d37b6 bitbake: hobwidget: Button theme is taken from host, fix
- All buttons in the interface inherit a BaseHobButton that
  use the gtk settings for buttons from the host;
- Removed 'or' label between actions on image details page

[Yocto #3011]

(Bitbake rev: 1a8356b57f906cf575612eb52fc8d3a9824ff9a7)

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Robert Yang 7d8b49cfe4 bitbake: fetch2: unpack rpm, ipk and deb binary package
* Unpack the ".rpm" binary package (only .src.rpm in the past)

* Unpack the .deb and .ipk binary package, their unpack commands are the same.

* This is useful for binary package recipe.

[YOCTO #1592]

(Bitbake rev: de7ceb9459574f33920ccc06255b533434f0ec25)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Cristiana Voicu 399d7f2029 bitbake: hob/recipe&packageselectionpage: Change "Back" button to "Cancel" button
"Back" button placed on RecipeSelectionPage and PackageSelectionPage
was changed to "Cancel" button to avoid any confusion.
Also, it was placed next to the other buttons on the page.

[YOCTO #3012]

(Bitbake rev: 1785b49a1b0b9698851d6e8aea94d1d2aa22c445)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:42 +01:00
Cristiana Voicu 34c4b3a93d bitbake: hob/imageconfigurationpage: Set secondary action for "Edit image" button
The image configuration screen should have only one primary action.
"Edit image" button has now secondary action, and also I have removed
"or" label.

[YOCTO #3010]

(Bitbake rev: f54191dac18b4e1100944cc6da86705c1e9c1683)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Cristiana Voicu 0edb99f38a bitbake: hob/packageselectionpage: Add tooltips to 'Included' and 'All packages' tab and 'Search' field
For the 'Included' tab: "The packages currently included for your image"
For the 'All packages' tab: "All packages that have been built"
For the 'Search' field: "Enter a package name to find it"

[YOCTO #2322]

(Bitbake rev: 0828f352419127fb30dc4eb5f91feba84ea59202)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Cristiana Voicu b2e2badd51 bitbake: hob/packageselectionpage: Correctly restore previously selected packages
"Back" button from "Packageselection" page now restores correctly previously
selected packages list. Till now "Back" button was implemented just to switch
pages, not to cancel changes you have made to packages list.

[YOCTO #2984]

(Bitbake rev: 1ad03d6a327eb3389f7b4d0d74d2e8ae8b50c3b6)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:41 +01:00
Kang Kai c8db2f66de bitbake: hob2: remove class hcc
Because class hcc is useless, remove it.

(Bitbake rev: 08d4a0f76542e05755c298b3875ea373e5512e13)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:40 +01:00
Kang Kai da98eddd02 bitbake: hob2: remove the hard-coded images map
[Yocto #2795]

When a new image type added, the hob will crash because the new type is
not in the hard-coded image dictionary.

For most of the image types, they are same with the image file's
extension name. So use variable "IMAGE_EXTENSION_difftype" to map the
image type which is diff with the image file extension name, such as
type "live". And the variable(s) will be set in image_types.bbclass.

(Bitbake rev: e7c84f056af9c613920d5adcd078a011e0387193)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-07 12:10:40 +01:00
Richard Purdie c5ce2878b3 bitbake: taskdata: Don't add dependencies on tasks that don't exist
"bitbake meta-toolchain" with qemu image testing enabled causes problems
since it adds a task after do_rootfs which doesn't exist in this case.

We should simply ignore these extra dependencies rather than adding
them in which is what this patch does (adding a debug message when this
happens).

(Bitbake rev: 843d3d6b0a7eb2e2f7b50c555767f5385df16ede)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-30 17:44:07 -07:00
Richard Purdie 1e59ae05c1 bitbake: ast: Store anonymous python function contents in the datstore
This is useful if we need to disable part of one during a backtrace
for debugging purposes.

(Bitbake rev: 80a0c1b06a30a6ba9977c29fac0437a208d8cbbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie ce682323a9 bitbake: ast: Extract text variable in PythonMethodNode
(Bitbake rev: 2e98f740b4a57a3467b1a00b1ebc1aaee33a8ff0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 9e8ba3036d bitbake: ast: Rename PythonMethodNode define variable to modulename
It was hard for me to understand what the define variable was, modulename
is hopefully a bit better.

(Bitbake rev: 79f9f46319de85f85613ebe248c327f5852225ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie c8cce4e0d6 bitbake: methodpool: Clean up the parsed module list handling to be slightly less insane
This removes some dubious functions and replaces them with a simpler, cleaner
API which better describes what the code is doing. Unused code/variables are
removed and comments tweaked.

(Bitbake rev: f1e943aebfb84e98253f3f21646d6765c4fa1d66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:44 +01:00
Richard Purdie 43cbd5afce bitbake: methodpool: Remove unused check_insert_method function
(Bitbake rev: 4664333e55ffc9d618f2c2f074200923209fd6c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie ae71aa0fbb bitbake: cooker: Add explict handling of BBHandledException for parsing failures
This removes some unnecessary tracebacks

(Bitbake rev: db0ff7b4d47fce8322dd2350a2b1a6f60ef61d25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 4f3d48653a bitbake: cooker: Ensure parsing failures stop the build
Currently parsing failures still allow bitbake to continue on and try
and execute a build. This is clearly a bad idea and this patch adds in
more correct error handling and stops the build.

The use of sys.exit is nasty but this patches other usage in this function
so is at least consisent and its better than the current situation of
trying to execure a half parsed set of recipes. There are probably better
ways this could be improved to use to stop the build.

(Bitbake rev: 22756e9c0f1da33ba2c6e881b214577a610b7986)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:43 +01:00
Richard Purdie 999ee044b9 bitbake: utils.py: Once we've printed errors messages, suppress the backtrace
Adding a generic backtrace to better_compile and better_exec is pointless,
therefore reraise the exception as a bb.BBHandledException so the
generic code doesn't confuse the user even more.

(Bitbake rev: b3d97130e1e70fe969399277dcd7cccd888103d6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 64c002875f bitbake: utils.py: Try harder to extract good traceback information by querying the datastore
Currently as soon as execution passes outside the code fragment being
executed by better_exec, we don't get any good traceback information,
just a likely obscure reference to some function name which may
or may not be identifiable.

This patch adds code to query the datastore if present, allowing a more
meaningful back trace to be displayed in many cases.

[YOCTO #2981]

(Bitbake rev: 0edf8431f9ff52581afe0d3ef525c59909af02ba)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Paul Eggleton fddc16989d bitbake: cooker: fix traceback when using -b with skipped recipe
If a recipe is skipped during parsing for whatever reason, check and
report this as an error rather than trying to use the data that is sent
back and failing.

Fixes [YOCTO #2976].

(Bitbake rev: a324df40243fa55ccc89fd5970d46f25330d0a0d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-23 09:22:42 +01:00
Richard Purdie 21773a997a bitbake: event/ast: Use better_exec instead of simple_exec
This improves the stacktraces dumped by bitbake when for example anonymous
python functions fail.

Also default to passing code strings to better_exec to match the behaviour of
simple_exec to aid the transition.

(Bitbake rev: 7e8205929ae953731a6854ea80b197847cff5771)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Konrad Scherer 1a7069e97b bitbake: ui: Improve error message if bitbake cannot import python curses module
On some SuSE systems, the curses python module is not installed by default.
Instead of a python failure, we want a nicer error message.

(On SuSE systems the package is typically python-curses.)

(Bitbake rev: 65a5845ac942d0aa6838c295e41b656f9d2a98bb)

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>

Reword commit message, rebase to latest bitbake.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:57 +01:00
Paul Eggleton a46fac74c3 bitbake: bitbake/cooker: minor refactor of parseConfiguration()
All calls to parseConfiguration set self.status and call
self.handleCollections() afterwards, so just do this inside
parseConfiguration() itself.

(Bitbake rev: 3c2322d8a6ce15e20adb07a61aa321d884a9bcca)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 980d658f3f bitbake: data_smart: skip all interal (underscored) flags in getVarFlags
(Bitbake rev: 9f631e29a2eebb96a8291839dd8b39aa9126a10e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:56 +01:00
Ross Burton 49bc007c80 bitbake: data-smart: rename the 'content' internal variable to '_content'
(Bitbake rev: 684cf09aed09ec82c8afb99895f92d73cd0519df)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Cristian Iorga 164083d31f bitbake: Hob wizard-like reorganization
Hob is now more context-sensitive regarding
user changes/options. Also, the workflow have been
streamlined and resembles more of a wizard.
Beautified some hardcoded values.
Fixed typo.
New streamlined Image Configuration page.
Build and/or Edit image buttons presence
is context sensitive.
Recipes and packages tabs selected automatically
based on custom image or pre-defined target image
(included or all).
Context sensitive Back button.

Fixes [YOCTO 2165]

(Bitbake rev: b48cd7dcf57b1abc8c5b46ced11d4f57bf06e557)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Paul Eggleton 2a6818eea1 bitbake: bitbake: hob: create console log directory before writing
The default value of BB_CONSOLELOG in OE-Core now points to a directory
that might not exist prior to the first build, so ensure it is created
first.

(Bitbake rev: 660821769b9dfb89086291ffc835e9b5444509be)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-22 13:59:55 +01:00
Richard Purdie 96ece9ad1a bitbake: build.py: Correct package to recipe in TaskBase events to use consistent terminology
(Bitbake rev: e5045429bce15b66c4355be214db3982ac7761f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:45 +01:00
Richard Purdie a86bd42264 bitbake: fetch2/git: Work around git confusion between foo.git and foo repositories
If you have foo and foo.git in GITDIR, the two can end up being confused
by git with some horrible union of the two being cloned. This adds
a workaround to avoid this happening until git 1.7.9.2 onwards is
common enough for this to be removed. We use a symlink to hide
the directories we don't want git to know about.

(Bitbake rev: bbf1f6fe594c721a296ca09ee7c583d4a205c591)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-18 16:21:44 +01:00
Richard Purdie 3c0451ec95 bitbake: really remove knotty2
(Bitbake rev: 587ce3bd76b5338c538dc9a5b9f06d42cb5ae3eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-17 15:25:14 +01:00
Andrei Gherzan af847d3637 bitbake: bitbake: build.py: Add stampdir argument to cached_mtime_noerror
After commit 2718537b4b (bitbake:
build.py: Only execute mkdirhier if stampdir doesn't exist) build
failes as cached_mtime_noerror needs an argument - stamp dir. This
argument was forgotten.

(Bitbake rev: e69103c4f7e45c24f1fbe9df0383f39e877abcb4)

Signed-off-by: Andrei Gherzan <andrei.gherzan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 12:27:41 +01:00
Richard Purdie 1fa112b632 bitbake: knotty: Fold knotty2 into knotty and make it the default
There is no good reason knotty2 shouldn't be the default now. If you need
the old behaviour, just pipe the output through cat as non-interactive
terminals get the old output.

(Bitbake rev: b97d50618b2187bcfd7d25f64d1444482ca62ef7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie c49a2529bf bitbake: knotty2: Handle long lines of text and terminal window size changes
Long lines of text which wrapped on the terminal corrupted the output shown by
knotty2. This patch catches such errors by becomming aware of the terminal size.

It also catches terminal window size change events and adapting to those
changes using a signal handler.

Based on a patch from Jason Wessel with several tweaks and enhancements
such as use of chained signal handlers and covering all output messages.

(Bitbake rev: 9afc9e4d14abec5ac326851d4bb689c1e8d45a43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:03 +01:00
Richard Purdie 2718537b4b bitbake: build.py: Only execute mkdirhier if stampdir doesn't exist
I noticed this was showing up on profile logs as a sigificant time user
in "bitbake bash" when bash was already built. It reduces the time from
5.2 to 4.5 seconds in my test environment.

We make use of the parser's mtime cache as once a directory exists,
we can assume it continues to exist and this avoids syscalls.

(Bitbake rev: 769b694eeb617bb793bd79d0d7b29c43d2646ece)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie e2d023ff5f bitbake: bb/ui/uihelper.py: Ensure task current and total numbers are updated for setscene events too
This avoids task (0 of 0) type messages being displayed during setscene by knotty2.

(Bitbake rev: 53efa01720a61da2cb344cbb7e977baa28deba3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 4c4f714612 bitbake: knotty: Chain the WINCH signal handler in progressbar so any other handler is preserved and called
(Bitbake rev: 7753e075dbeee471b9ceb34f1e3165aa656932ed)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-16 11:19:02 +01:00
Richard Purdie 9df0a20d95 bitbake: data_smart: Fix unanchored regexp causing strange parsing issue
If this regular expression is unanchored, it would accept strings like:

do_install_append1
do_install_appendsomelongstring

and treat them like they were do_install_append. Clearly this isn't desirable.
Only one instance of this type of issue was found in OE-Core and has been fixed
so correcting the regexp should be safe to do.

(Bitbake rev: 23bd5300b4a99218a15f4f6b0ab4091d63a602a5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-03 10:25:10 +01:00
Martin Jansa cecf2b48be bitbake: cooker: fix OVERRIDES in BB_SIGNATURE_HANDLER (to override value from DISTRO.conf from local.conf)
We really need to pass the finalised data store into the parser init function
(and hence the siggen init function). This ensures any value changes get
passed into the correct code.

(Bitbake rev: 19efc6081c15a59bb8f5aaf8478650a2732cafe8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 6ffb679c07 bitbake: fetch2/local: Add search paths to the debug log to improve log usefullness
(Bitbake rev: 2054c7d99933c1523d4b5c7f65d37c69b8472e47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 43a25fff55 bitbake: fetch2/local.py: Provide better debug output when fetch of a local file fails
When a fetch failure occurs for a local file, this patch ensures we print the
locations searched making it easier for the user to debug the problem.

(Bitbake rev: a461adbc5f09b41c771a7603370f6f2d1299ae8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:04:27 +01:00
Richard Purdie 67bfb37475 bitbake: runqueue.py: Clean up runqueue exception catching in the normal task failure case
(Bitbake rev: a0bc58031d4eb31f8587171e870ecad059af5098)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 23:01:35 +01:00
Liming An 8a3ae43815 bitbake: Hob: change the Build failure scenario as ui design
As ui design 'build-fail-spec.pdf' to change the GUI

[YOCTO #2183]

(Bitbake rev: f9b81e44b2e71b4de6729bd2c69b25fd619b5fed)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Liming An 94e2a104ec bitbake: Hob: log for Hob and allow users to show logs after successful build
If users build images in Hob, record logs and allow users to retrieve the lo
after successful build.

The logs are generated if and only if:
      - users do "just bake"
      - users do "build image" after "build packages"
      - users do "build packages" only

[YOCTO #1991]

(Bitbake rev: 291289787bb042b99f0599babc2d67c220aadb87)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa 5d952ba4a0 bitbake: fetch2: print checksums when they are different then expected
* in form which can be copied into a recipe without modification
* like oe-classic did since:
  http://git.openembedded.org/openembedded/commit/?id=68abc465559a68e9201c9525be3c4acc6297eaed
* it shows them in right form when they are missing completely, but in
  more verbose form when different
* it needs to print that only when checksums were requested, e.g.
  fetching from sstate mirror sets both md5mismatch and sha256mismatch,
  but your checksums shouldn't be shown

(Bitbake rev: 9eb34fc866775fd8310759a0111f232a9dc98981)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Christopher Larson 420891731f bitbake: fetch2: handle broken symlinks in local mirror handling
If a file:// mirror is being used, the fetcher will create a symlink to the
local file. However, if the local file gets removed, that link will be dead,
and os.path.exists() returns False in that case, so it tries and fails to
recreate the link. Now we unlink such a dead link if it exists.

(Bitbake rev: 229ed3857e826e3e215e843cb51f729c1e13ed37)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Martin Jansa f1417a1349 bitbake: knotty: ensure that directory for BB_CONSOLELOG exists before using it
(Bitbake rev: 1e06d8012868ba5a31503dc99cbf18570be629d9)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:06 +01:00
Mark Hatle 9fb5c34750 bitbake: fetch2/__init__.py: Add NoChecksumError exception
Without the new exception, when the system is configured to use premirrors,
but not allow network access (via BB_NO_NETWORK), when a recipe was lacking a
checksum the wrong error message(s) were being generated.

Instead of complaining about trying to perform network access, if the system
was able to find the item in the premirror, it should inform the user of the
lack of checksums, and the two SRC_URI fields they should use to update their
recipe.

(Bitbake rev: cb10e9c03a3f96d94e27e18330009616dde5e2b3)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 17:05:05 +01:00
Kang Kai 6a293985b2 bitbake: hob: deal event DiskFull
Part of [Yocto #2168]

When bitbake runqueue is teminated by disk monitor, it will send event
DiskFull. Update to handle it.

(Bitbake rev: a691de10d8b8de552628b277e78d47c607ee3a46)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:40 +01:00
Kang Kai b2a959a0ce bitbake: monitordisk: fire event DISKFULL when terminate build
Part of [Yocto #2168]

Add a event DiskFull to descript the termination by disk monitor.

Update check() to fire the event DiskFull when terminates the build.
This could help UIs to deal this scenario and show more information to
end user.

(Bitbake rev: 0a0fca3d94a1db6458ae21501a66461a334410ed)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-02 15:28:39 +01:00
Richard Purdie 8febf64b1d bitbake: fetch/local: Allow preservation of path components in relative file:// urls
This enhances the fetcher to allow preservation of the path component in urls
like: file://xxx/yyy/somefile.patch.

(Bitbake rev: e49a656a499355a5c6e7eb00bf5b8f1795e8dddb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie c74f3d44c6 bitbake: runqueue.py: Wipe out the stamp cache between setscene and main task execution
The stamp files can change during setscene and the cache should be cleared to
account for this.

(Bitbake rev: 5ec12f586a50fce675b268965b3dc487aaa96c43)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie 0984853ced bitbake: runqueue.py: Allow the setsceneverify function to have a list of tasks that are invalid and need to run
There was some odd behaviour if some task was run from setcene whilst there were
existing valid stamps for a depepdency. For example, do_populate_sysroot might
be installed at setscene time but if there were other tasks not installed from
setscene such as do_populate_lic which depend on do_configure, the setsceneverify
function would think that do_configure needed to be rerun and would hence void the
do_populate_sysroot and force that to rerun too.

The setsceneverify function needs to know which tasks are going to be rerun, not just
what the overall task list is and what setscene functions have run. This patch adds
that information and maintains backwards compatibility in a slightly ugly but effective
way. The metadata needs updating to take advantage of this change.

(Bitbake rev: 1423aafff97f17169e95ec3ba973eb002ff98c1c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:22 +01:00
Richard Purdie b22592af81 bitbake: runqueue.py: Ensure one setscene function doesn't mask out another which needs to run
The scenequeue code could result in one setscene function masking out another
which had been marked as notcovered. This change ensures the notcovered list
is taken into account when deciding which tasks need to be run, ensuring
that tasks that should be run do get run.

(Bitbake rev: 95b31127d8ba12ccb061d67481ece134c18c39f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 58f0d04f78 bitbake: runqueue.py: Optimise the hashvalidate call to only process tasks we may actually want
Currently we call the hashvalidate for anything without a valid setscene stamp.
This improves the code to account for existing stamp files so that we only process
setscene hashes for things we might actually end up using. This avoids hash processing
and makes things slightly more efficient and the logs less confusing.

(Bitbake rev: 2e71a65bd910e8be894b8284eb0a50de7270c081)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie dfdb2eb33e bitbake: runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
There was a bug where an exception in the runqueue code would cause an infinite loop
of debug messages. The exception would get reported but would loop since runqueue was
still registered as an idle handler.

This patch adds an exception handler to ensure in the case of errors, the system
more gracefully shuts down and doesn't loop.

(Bitbake rev: 99467c7e387f6e71358b40b8afae450d72cd68e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Richard Purdie 46d8d04d51 bitbake: runqueue.py: Fix a stamp comparision bug
We check the stamp cache before comparing t2 and t3 which means that we can miss
a level in the stamp file chains. The result of this is that a stamp can be accepted
as valid when in fact it isn't. Some weird behaviour alerted me to this in a local
build.

This patch also fixes to only uses the cache in recurse mode, there was a corner
case where stamps not in recurse mode could get added to the cache which could cause
an issue potentially.

(Bitbake rev: 7a5f776d325c0e37f58003424beda7cae2695325)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:55:21 +01:00
Nitin A Kamble 444ad513c0 bitbake: bitbake wget fetcher: add parameter: downloadfilename
this allows wget fetcher to store the downloaded file in a specified custom filename in ${DL_DIR}

Exmaple:
SRC_URI = "https://edc.intel.com/Download.aspx?id=6190;downloadfilename=LIN_IEMGD_1_14_GOLD_2443.tgz"

This fixes bug:
[YOCTO #2570]

(Bitbake rev: ceb5871007f221c4d86a7bee421d4dd8d9100aaf)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Martin Ertsaas 8a978eeda0 bitbake: Change bzr fetcher to use branch instead of co. Fixes: bzr: ERROR: No pull location known or specified.
This problem occurs when fetching a different revision of the same source. Which mean every time you update a bzr package.
Using branch sets the pull location, and are the preferred way of cloning/branching a repository in bzr.

(Bitbake rev: 877a04d0b3cea9d5dbdf3c54fe0feb54cb997dda)

Signed-off-by: Martin Ertsaas <mertsas@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 897d7d171e bitbake: cooker.py: Ensure we track parser errors and only show bbappend issues on complete parse
Currently if any parsing failure occurs, there can be a long list of
bbappends that are "dangling" based on the fact that recipes were not
parsed. This change firstly ensures the error counter is incremented
and secondly that the bbappends list is only shown on a completed
parse list.

(Bitbake rev: 358952f0d874b869d361bbd72a5ea317bf939cd3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-24 10:35:33 +01:00
Richard Purdie 26ace2c081 bitbake: Update version to 1.15.3
(Bitbake rev: befbb5c9428eaf98b2ff9c4b36b0b3f2dce7fe07)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 798415bd21 bitbake: bitbake: Warn upon finding tab indentation in python functions
Mixed spacing in python functions can cause subtle issues and
generally confuses users. We've standardised on 4 space indentation,
adding this warning helps ensure consistency and avoid bugs. It
also makes _prepend and _append operations on python functions slightly
less risky.

(Bitbake rev: c51cfaf48d3b12a19b01e824b6ba4230376bcad4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Martin Jansa d5fb11747a bitbake: fetch2/svn.py: Use protocol parameter to get the protocol
* it was send in v1 of proto -> protocol changes but then wasn't in V2
  http://patchwork.openembedded.org/patch/31617/
  where warning about proto= was moved to shared __init__

(Bitbake rev: b2017f493ab730d804ae44ec5a168d464626d046)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 12:43:50 +01:00
Kang Kai 4bd0338972 bitbake: hob2: add elf to hcc supported image types
[Yocto #2709]

OE Core Commit c9b01af84b add elf image
type. This will cause hob build image failed.
Add elf to hcc supoorted image types to fix this issue.

(Bitbake rev: a93a58b7cea2ddb9596cb4d718c0801db5d1a295)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Jeffrey C Honig 4b8f43aaa6 bitbake: siggen.py: Insure .siginfo files writes into shared sstate cache are atomic
Use tempfile.mkstemp to create a temporary file in the sstate dir and move it
   into place after closing.  The previous code would fail in the chmod() if two
   users were running jobs that touched the same signature file.

(Bitbake rev: ff11e9ac5eba2d957917664a7b91b1277d8ad548)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Richard Purdie 05e5ec2be8 bitbake: runqueue.py: Improve error output to be more useful when non-existent tasks are found
(Bitbake rev: 9be584272a63f48d8dc7c9f05b017d11250aa247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:54:07 +01:00
Andrei Gherzan a3a697c425 bitbake: fetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"
As well, if "proto" is used, get the associated value as "protocol"

(Bitbake rev: 53e6b630f0463d2d07cdaa9c9eb36794dc9b6b69)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:26 +01:00
Andrei Gherzan c26f6b2b94 bitbake: fetch2/bzr.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 630876b40ed181312e84f902c4cfb97361afbe81)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan bd8d18f742 bitbake: fetch2/hg.py: Use "protocol" parameter to get the protocol
(Bitbake rev: f4a780a7f50fdd8f2bd75888dad790bcfe95b873)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Andrei Gherzan cf599d12d3 bitbake: fetch2/osc.py: Use "protocol" parameter to get the protocol
(Bitbake rev: 01040efce82cfbaa76f46d9f95c984be8f9ea810)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Wenzong Fan 6a210e88b7 bitbake: bitbake: Abort build if runtime dependency conflict
Currently if there are multiple preferred providers available for
a runtime dependency, bitbake will print an Error message and let
the build go on. Anyways the build should abort while any Errors
occured.

[YOCTO #2734]

(Bitbake rev: 5f81a714f4fca785780bef555b419f0250e5ec1c)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-11 15:55:25 +01:00
Richard Purdie 029e3cea52 bitbake: fetch2/wget: Use FETCHCMD_wget to provide the commandline and options
This also changes to use  -t 2 -T 30 as the defaults which are more sane for
a modern fetcher and already specified in OpenEmbedded metadata.

(Bitbake rev: bf0e5dddf0f63cdb0648fb6d872af5ceef6fbfb0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Richard Purdie 254488f089 bitbake: fetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself
This brings the cvs fetcher more into line with the others and allows consistent usage
of the FETCHCMD variable and option handling.

(Bitbake rev: 390ad59739356422852e976fa246375abc6aba08)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-10 14:25:38 +01:00
Robert Yang 041a0e8dff bitbake: bitbake/cooker: Print which pkgs would be built in -g output
This is for giving the user a clear list to show which pkg would be
built, we have the "bitbake -g", but it is not easy to read for people,
it is for "dot". Improve the "bitbake -g" to also save a pn-buildlist:

$ bitbake -g core-image-sato
...
NOTE: PN build list saved to 'pn-buildlist'
[snip]

The contents of pn-buildlist:

busybox
shadow-native
pth
sysfsutils
qemu-helper-native
curl-native
ncurses-native
gdbm
xserver-xorg
linux-libc-headers
[snip]

[YOCTO #2404]

(Bitbake rev: 18aff925aece774d0172894e25584353519ca03f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 17:19:32 +01:00
Richard Purdie 136751122a bitbake: data_smart: Fix multiple override interaction with append and prepend operators
Variables which used multiple overrides and the append/prepend operators were
not functioning correctly. This change fixes that.

This fixes the testcase:

OVERRIDES = "linux:x86"
TESTVAR = "original"
TESTVAR_append_x86 = " x86"
TESTVAR_append_x86_linux = " x86+linux"
TESTVAR_append_linux_x86 = " linux+x86"

[YOCTO #2672]

(Bitbake rev: dc35a2e506e15fb7ddbf74c3b3280e9e83ab33bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-05 12:36:45 +01:00
Richard Purdie 3051f36444 bitbake: runqueue.py: Fix recursive task pruning to only prune self referencing tasks
(Bitbake rev: 4962a59793504b26b06cf058dda600a07fbbd951)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 17:40:38 +01:00
Richard Purdie dd5f6ae551 bitbake: fetch2/svn: Enhance to cope with subversion 1.7 upgrade
svn changed working checkout formats between 1.6 and 1.7. Its convoluted to
detect what format a given working copy is in so the simplest solution is simply
to run "svn upgrade" within the working copy.

The base svn command variable is relocated slightly to enable this new code to
work effectively.

(Bitbake rev: ebd3ecdb5f3c6d3fe1fad27cbed4d80f4277e92e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:15 +01:00
Richard Purdie 3488966926 bitbake: runqueue.py: Allow recrdeptasks that have self references
In some cases we want to pull in DEPENDS and RDEPENDS of recrdeptask
dependencies but we need a way to trigger or avoid this behaviour
depending on context. The logical syntax to trigger such behaviour
would be a self referencing recrdeptask:

do_a[recrdeptask] = "do_a do_b"

The dependency chains already recurse this kind of expression correctly, the
missing piece is to avoid any circular reference errors. Since the dependencies
have already been recursively resolved, simply removing any recrdeptask
references is enough to break the circular references.

This patch therefore removes any circular references using the set
difference_update() operator. There will be metadata tweaks required to
add any references needed to the extra taskname.

(Bitbake rev: a5324da9b8a0c9307a6c511ea9009f34be70c92b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An 5d79175b87 bitbake: Hob: fixed some variables not clean bug in detail page
[YOCTO #2679]

(Bitbake rev: 73801f571e040dcdfeb15a15b9a484cbefaae70c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Enrico Scholz 86aeee98cf bitbake: git: do not execute 'git remote prune'
'git remote prune' at this location does not make much sense because
the following 'git remote rm' will prune stale and non-stale branches.

The 'prune' can cause trouble because it will access the network
bypassing the no-network code in bitbake. When this operation fails and
throws an exception, the next command (--> 'git remote rm') will be
skipped.  This in turn, will make all the following operations fail,
because they assume that the remote does not exist yet.

(Bitbake rev: 2ba23df5fad4b94d38a6aed97f7822226d72eb89)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04 14:48:14 +01:00
Liming An a5b2c1e4ce bitbake: Hob: change 'run image' and 'deploy' Gui and work flow for building detail page
In build detail page, the response action of clicked the 'run image'
or 'deploy' button will accroding to below as ui design:
1)if there has one file in building result, it will responsed the
'run image'(now, we only support the qemu) or 'deploy' directly
2)if there has more than one file, it will popup a dialog with listed
created files type, they are has same action attributes 'deploy'
or 'runnable'.
Note: because the qemu image (runnable file) can't be deployed and
we can't generated a image that has the two attributes now, can be run
or can be deployed,  so the code will not deal with this case.

[YOCTO #2155]

(Bitbake rev: 0d24b1e85a11b68c8464cf15b49d3fc78f216818)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-29 14:46:47 +01:00
Richard Purdie 4129d5dc7c bitbake: runqueue.py: Handle multiple rdeptask entries
I'm not sure why we don't currently allow multiple entries in rdeptask when
we do in deptask. This makes the handling match between the two since
its trivial to fix.

(Bitbake rev: 19c84fe8854639768c874cc1449963a9867ad397)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 18e3b500b9 bitbake: fetch2: Revert the regexp removal for the type field and instead anchor regexp
People are using regexps in the url type field so we need to preserve
this bitbake behaviour. To address the issues with https:// urls mapping
badly to file:// urls we anchor the regexp if its not already anchored.
There should be no expressions in the wild which would break with this
change.

(Bitbake rev: ce0579dc256251e523c6330641f98b9f5a0e5761)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie c525c131a6 bitbake: test/fetch: Switch the comparision order to make test failures slightly clearer
(Bitbake rev: 2b1311e21172847b6a86cfb21a84fd00e4ab1ac5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie b13951f96d bitbake: test/fetch: Ensure cwd is valud for the git clone
(Bitbake rev: 60b1a9f52dfec98e55a879a637f7142b0175b452)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie 5fa6036d49 bitbake: runqueue: Reimplement recrdepends so it works more correctly
Currently, recrdepends is extremely greedy. For example:

do_foo[rdepends] = "somedep:sometask"
addtask foo

which adds foo with *no* dependencies, will suddenly start appearing
as a dependency in every task which uses recrdepends. So far this has
been mildy annoying but we now have use cases where this makes no sense
at all.

This reworks the recrdepends code to avoid this problem. To do this we
can no longer collapse things into lists just based on file ID. The problem
is this code is extremely performance sensitive. The "preparing runqueue"
phase spends a lot of time in these recursive dependency calculations so any
change here could negatively impact the user experience.

As such, this code has been carefully tested on convoluted dependency trees
with operations like "time bitbake world -g". The net result of this change
and the preceeding changes combined is a net speed up of these operations in
all cases measured.

Tests were made comparing "bitbake world -g" task-depends.dot before and after
this patch. There *are* differences for example -nativesdk do_build dependencies
on -native recipes are no longer present. All removed dependencies appear to
be sensible improvements to the system. The "rdepends" cross contamination
issue above is also fixed.

(Bitbake rev: 82d73423c57569b984ee0ae3d93e3c3bd5dc5216)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie be22b92627 bitbake: runqueue.py: Convert depends variable to use sets
This gives some small performance gains and sets the scene for other
improvements by removing the need for duplicate detection code.

(Bitbake rev: 6fd723479e8d49227fd58040b3485c1d5afc4bc5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Richard Purdie edfb2ba32c bitbake: 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.

(Bitbake rev: 3190cb83e2af195a464f669c5aa8aedbf795160e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:32:57 +01:00
Cristian Iorga 2e4bd35df8 bitbake: Fix for Hob bug #2323
Removed unnecessary button from Recipes screen and
replaced the button that diplayed packages size and total image size
from Packages screen with a label.

(Bitbake rev: e6ff1d4bab43fdcd8af1230f1d54615f53c1978e)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Kang Kai b224ed2065 bitbake: hig.py: use module tempfile to create temp file
I am sorry that use os.tmpname which casue a security warning.
Follow Darren's suggestion to use tempfile.NamedTemporaryFile instead.

(Bitbake rev: fe514a130579302312f68821536d108c8ceb4363)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Richard Purdie 72f04e760d bitbake: fetch2: Ensure star character doesn't end up in mirror tarball names
If '*' does end up in mirror urls accidently, some strange things
can break since supports_checksum() looks for this, ud.localpath can
then get ignored and this can lead to empty directories being downloaded
"successfully". '*' is a special case for file urls only at this point
so remove any entries that accidentlly make it in through url mapping.

(Bitbake rev: 1369bec2404d942acc3618a8d005ec6868dcfd41)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:17 +01:00
Paul Eggleton bd3fd17fc5 bitbake: lib/bb/utils.py: remove unnecessary preserved variables
_ and LANG no longer need to be preserved from the external environment.
The value of _ changes between non-pseudo-wrapped and pseudo-wrapped
invocations (e.g. between "bitbake -p" and "bitbake target") and this
will currently trigger a full reparse in the absence of a whitelist
entry in BB_HASHCONFIG_WHITELIST, which is not ideal.

LANG used to be preserved in order to ensure the C locale was being
used for tools invoked by bitbake, however we now set LC_ALL in
bitbake.conf to take care of this.

Second part of the fix for [YOCTO #2600].

Acked-by: Jason Wessel <jason.wessel@windriver.com>
(Bitbake rev: 1c531dff2fb055ecab2d462027eecec3fabc2a44)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie 9334b0d002 bitbake: fetch2: Add new mirror syntax to simplify mirror specifications
When writing mirror specifications, the current regexp syntax can be awkward
and hard to get it to do what you want. For example, extracting the 'basename'
of a repository:

PREMIRRORS = "git://.*/([^/]+/)*([^/]*) git://somewhere.org/somedir/\\2;protocol=file"

can now become:

PREMIRRORS = "git://.*/.* git://somewhere.org/somedir/BASENAME;protocol=file"

which is much clearer. A MIRRORNAME substitution is also added which contains
an encoded form of both host and path. One of the problems with the existing
regexp syntax is you couldn't access HOST information from PATH and vice-versa
which is an issue this patch also addresses.

Tests for the new syntax are also added.

(Bitbake rev: c6b1acbad7b3d2698530eb8b5249adb4ab95da21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie e63dada732 bitbake: fetch2: Handle errors orruring when building mirror urls
When we build the mirror urls, its possible an error will occur. If it
does, it should just mean we don't attempt this mirror url. The current
code actually aborts *all* the mirrors, not just the failed url.

This patch catches and logs the exception allowing things to continue.

(Bitbake rev: c35cbd1a1403865cf4f59ec88e1881669868103c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie a87aa7b7af bitbake: process: Improve _logged_communicate buffering
There are two problems with the _logged_communicate that are both
caused as a result of buffering I/O issues:

1) log truncation when python fails

2) While a bitbake task is running it is impossible to see what is
   going on if it is only writing a small incremental log that is
   smaller than the buffer, or you get only a partial log, up until
   the task exists.  It is worse in the case that stderr and stdout
   are separate file handles, because previous code blocks on the read
   of stdout and then stderr, serially.

The right approach is simply to use select() to determine if there is
data available and also flush the log before exiting.

This is based on a patch from Jason Wessel <jason.wessel@windriver.com>
with some changes to flush upon exit, abstract the non blocking file
descriptor setup and drop the buffer size parameter.

(Bitbake rev: 361fb71e907aa84c28ecec79fefc6ca39c39172f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie 15a31a93ba bitbake: taskdata.py: Add support for rdepends task flag
Currently its not possible to add arbitrary RDEPENDS to a specific task.
This can be useful and this patch adds functionality equivalent to the
'depends' task flag.

(Bitbake rev: db65080a6199baecc5c422294a4c4a9fd12dc29e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00