Commit Graph

1976 Commits

Author SHA1 Message Date
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
Robert P. J. Day 5051e9837f bitbake: usermanual: Fix missing markup
(Bitbake rev: 68af2b09315ba35eae24933a599014a662789c2c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-06 09:41:56 +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 852266d0bc bitbake: usermanual: Improve task dependency documentation to match reality
(Bitbake rev: f67c0606fc681359fb0c68be55cfc9f11d410f17)

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
Richard Purdie be98c1fc29 bitbake: utils.py: Add function to set nonblocking operation on a file descriptor
(Bitbake rev: ab6d71ebfcfb7bedc064b25f84647c8815096e5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Richard Purdie e05b423cc6 bitbake: git.py: Remove -l option, its not necessary
If -l is specified and the source and destination are not on a common
filesystem an error occurs. The -l option is however the default for
git for local paths which the fetcher already now ensures in the
file:// case.

We can therefore safely drop the -l option.

(Bitbake rev: 3aeb268b2aaab4bb8b1cfff1450e0b76aa8ce855)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:16 +01:00
Paul Eggleton df929f4d37 bitbake: lib/bb/siggen.py: log when tainting the signature of a task
Log a note when applying a taint to a task signature (e.g. when using
the -f or -C command line options) so that the user knows this has been
done.

(Bitbake rev: 0fd960fdea83874eedb541cbc2920257e0f3fb81)

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
Paul Eggleton 25441f47ca bitbake: bitbake: tweak help text for -C slightly
What is specified is a command (or "cmd" as in the help text for -f)
rather than a task - i.e. you specify compile, not do_compile, so change
the sentence to reflect that and reorder it slightly so it makes sense.

(Bitbake rev: 9ab269410ef5cd4753fe11ec74759f421685bb7b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-25 14:57:15 +01:00
Jason Wessel fa7c2b0743 bitbake: fetch2/git.py: Optimize clone fall back when it is local
A file:// url should use "clone -l" to greatly speed
up the clone in the case of a kernel when it is local.

(Bitbake rev: 2bab2cc3ffe67ee2a308074a6e4c2c7be5636d2f)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:21:23 +01:00
Kang Kai dee397af90 bitbake: ui/depexp.py: use the new progressbar in Hob
[Yocto 2149]

Use the new progressbar in Hob, so that we can reduce the maintenance
burden of the multiple GUIs.

(Bitbake rev: 6c0da26adbdcaa0c56737bacddb61678a9095e32)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:21:23 +01:00
Richard Purdie df0059b465 bitbake: fetch2: Update replace_uri to handle uri types explicitly
For mirror mapping, we never use regexps for the type component of
the url. Doing so causes various slightly bizarre behaviour such as
https:// urls being translated to files:// urls which we have no handler
for. This patch forces the type matches to be direct, not regexp based
and gives the expected bahvriour.

(From Poky rev: 695d8aca0999d2d61970b990e83c3132ba6f12cb)

(Bitbake rev: 604df1b25cf114e083f52917df2df64e01279c25)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie dd249ebe67 bitbake: test/fetch: Add a couple of extra test cases
(From Poky rev: 01d8220ef8580ca980a14c05d500765ca2d37e2c)

(Bitbake rev: 0d0a12fa0e4dabf01c1c24370aff54d26690a6dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie ad8d1d3a15 bitbake: test/fetch: Add in unit tests for uri_replace() and git premirrors
(From Poky rev: 4be81b5cadb7813d37152411c23764501f5869d3)

(Bitbake rev: f91b4c2e3a2b3029d653a18de7ae2b0ecd7e2536)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:34 +01:00
Richard Purdie a627fe5afe bitbake: fetch2: uri_replace() only consider ud.localpath where its a file
Using ud.localpath as a basename when it points at a directory causes
problems. The supports_checksum() method gives a good indication of whether
ud.localpath can be used in the way we need.

(From Poky rev: 933ec8a44634e33f92f6f76de3a34094c3d63aa6)

(Bitbake rev: dcd79ae20ab2c72c3312b2251c2b6dc4cabe988e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 548465141a bitbake: fetch2: uri_replace() improve mirrortarball handling
We only consider mirror tarballs when the source and target urls are of
differing types. We also should clear all url paramters when handling
mirror tarballs.

(From Poky rev: da140b8b0b3dda5429f9eee68829ef5247cdfe12)

(Bitbake rev: 7619dcad29a6c2405b15a8fbadfa11e81b399ae1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 83bbfa07ab bitbake: fetch2: uri_replace() remove what amounts to a null operation and add some comments
(From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc)

(Bitbake rev: e67af4d12f390ce6083965509ca9ea85a76dc351)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 196982a803 bitbake: fetch2: Add parameter handling to uri_replace()
This means that parameters in the source expression are used as part of the
match. Parameters in the destination are used explicitly in the final
url.

(From Poky rev: c465cb0c5c927dd41d96ad6d6fa1566349574bb7)

(Bitbake rev: 3c468ac3ed6d045561afce19b85ae9dd18d87cea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie bf8501897b bitbake: fetch2: Remove basestring test and simplify uri_replace
(From Poky rev: d5657883d34bfef6beec594ac8d799f617b6b3ad)

(Bitbake rev: 84ffc261f376429b3a6b5d7bf2f6217cd10ca12a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie a7d5c57006 bitbake: fetch2: Simplify some looping constructs in uri_replace()
(From Poky rev: c6bd25150a842a530f958d7233b15ae50d42c6c8)

(Bitbake rev: 075296f3e5e5e3662290a888a6ba11229a36b95a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 20649e95ed bitbake: fetch2: Improve mirror looping to consider more cases
Currently we only consider one pass through the mirror list. This doesn't
catch cases where for example you might want to setup a mirror of a mirror
and allow multiple redirection. There is no reason we can't support this
and the patch loops through the list recursively now.

As a safeguard, it will stop if any duplicate urls are found, hence
avoiding circular dependency looping.

(From Poky rev: 0ec0a4412865e54495c07beea1ced8355da58073)

(Bitbake rev: e585730e931e6abdb15ba8a3849c5fd22845b891)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie 3f441765a7 bitbake: fetch2: Explicitly check for mirror tarballs in mirror handling code
With support for things like git:// -> git:// urls, we need to be
more explicity about the mirrortarball check since we need to fall
through to the following code in other cases.

(From Poky rev: 28e858cd6f7509468ef3e527a86820b9e06044db)

(Bitbake rev: a2459f5ca2f517964287f9a7c666a6856434e631)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:33 +01:00
Richard Purdie f3fb4dc40f bitbake: fetch2: Split try_mirrors into two parts
There are no functionality changes in this change

(From Poky rev: d222ebb7c75d74fde4fd04ea6feb27e10a862bae)

(Bitbake rev: db62e109cc36380ff8b8918628c9dea14ac9afbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 927565c3b1 bitbake: fetch2: Ensure when downloading we are consistently in the same directory
This assists with build reproducuility. It also avoids errors if cwd
happens not to exist when we call into the fetcher. That situation
would be unusual but I hit it with the unit tests.

(From Poky rev: 86517af9e066c2da1d580fa66b7c7f0340f3403e)

(Bitbake rev: b886c6c15a58643e06ca5ad7a3ff1f7766e4f48c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 3c8a561a90 bitbake: fetch2: Only cache data if fn is set, its pointless caching it against a None value
(From Poky rev: c2df30bf6d1f8c263a38c45866936c1bf496ece5)

(Bitbake rev: f4b59cc6e1c3ddc168a1678ce39ff402ea1ff4cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 4a0dc38da6 bitbake: fetch2: Fix error handling in uri_replace()
(From Poky rev: 1bfba28a583cb167f60e05ecdf34d0786dc1eec5)

(Bitbake rev: aa7467a764ddcbc7d65af99e88cf093b6ec6d24e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 85dc355580 bitbake: fetch2/__init__: Make it clearer when uri_replace doesn't return a match
(From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc)

(Bitbake rev: eb96609864dec95a516e6e687dd6a2f31d523acf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Paul Eggleton c072fa8400 bitbake: bitbake: add -C option to invalidate a task and rebuild the target
This new command line option forces the specified task and all dependent
tasks up to the default task to re-run. This means that the following
single step:

bitbake -C compile somerecipe

is equivalent to the following two steps (with the recent change to -f):

bitbake -c compile -f somerecipe
bitbake somerecipe

Note that to work this option needs full hashing enabled (i.e.
BB_SIGNATURE_HANDLER must be set to a signature handler that inherits
from BasicHash). If this is not the case, -C effectively does nothing.

Based on a previous implementation of this option by Jason Wessel
<jason.wessel@windriver.com>.

Implements [YOCTO #2615].

(Bitbake rev: 2530e0faada5775897cfd1b93aba6925826dca73)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Paul Eggleton 5bd11a9bf3 bitbake: bitbake: ensure -f causes dependent tasks to be re-run
If -f is specified, force dependent tasks to be re-run next time. This
works by changing the force behaviour so that instead of deleting the
task's stamp, we write a "taint" file into the stamps directory, which
will alter the taskhash randomly and thus trigger the task to re-run
next time we evaluate whether or not that should be done as well as
influencing the taskhashes of any dependent tasks so that they are
similarly re-triggered. As a bonus because we write this file as
<stamp file name>.taskname.taint, the existing code which deletes the
stamp files in OE's do_clean will already handle removing it.

This means you can now do the following:

bitbake somepackage
[ change the source code in the package's WORKDIR ]
bitbake -c compile -f somepackage
bitbake somepackage

and the result will be that all of the tasks that depend on do_compile
(do_install, do_package, etc.) will be re-run in the last step.

Note that to operate in the manner described above you need full hashing
enabled (i.e. BB_SIGNATURE_HANDLER must be set to a signature handler
that inherits from BasicHash). If this is not the case, -f will just
delete the stamp for the specified task as it did before.

This fix is required for [YOCTO #2615] and [YOCTO #2256].

(Bitbake rev: f7b55a94226f9acd985f87946e26d01bd86a35bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-21 13:10:32 +01:00
Richard Purdie 4ff6160d90 methodpool: Improve method already seen error message
The current error message is confusing, this improves it to explain the problem
and the possible ways to resolve it.

[YOCTO #2530]

(Bitbake rev: d316f28ed725ff40daa8771c1aa224ac46d5b224)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:20:51 +01:00
Richard Purdie 1faf02599a fetch2/local: Ensure quoting is handled correctly from the url
The commit 420eb112a4f (fetch2: quote/unquote url paths) caused a regression
since local file urls containing quoted characters are no longer being handled
correctly. This fixes things so the url is dequoted correctly, fixing various
fetcher failures with recipes like "gtk+".

[YOCTO #2558]

(Bitbake rev: 95c0595d66b3f8a5f0716662ba2a878600f312ea)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Jason Wessel d43d3b007e fetch2: Fix missing output from stderr in fetcher logs
There are actually two problems to fix

1) The exception for bb.process.ExecutionError must be processed first
   because it is a derived from the bb.process.CmdError class and
   we never reach the ExecutionError otherwise.

2) The stderr needs to be printed as well as stdout to determine
   the root cause of a fetch failure.

The example I have is that I got a log that looked like:

--
ERROR: Function failed: Network access disabled through
  BB_NO_NETWORK but access requested with command
   /usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P
   /localds 'http://downloads.yoctoproject.org/[...CLIPPED...] url None)
--

That really didn't tell me much, but with this patch I get error above
plus the following:

--
STDERR: /net/[...CLIPPED...]kernel-tools.git: Read-only file system
--

(Bitbake rev: af2133a04e1f4b22b181adf9c71f89c439bb88cf)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Liming An ad78e3c189 Hob: fixed issue about 'select a base image' combo not sensitive
The combo view is not sensitive, after select recipes come back.
so fixed this issue.

[YOCTO #2500]

(Bitbake rev: debcea9c063f7bddcba1d4ed47edbe173ef1d9cf)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Liming An 2295ef1dc3 Hob: fixed an issue about no 'set_page' function in hob failed page show
Due in mistake deletion in previous patches, if building failed, will report
the error of no 'set_page', so add that function.

(Bitbake rev: b046f4316ee7f2afaa0bb723e4216714d9cb87a0)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:18 +01:00
Kang Kai 79df63514d image-writer: tweak some strings
Tweak some strings in accord with the script name 'image writer', and
remove extra noun 'button'.

(Bitbake rev: d2d65335e8fc2417ebd3910f645cc00a4abfbeaa)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai d2bdfe0e66 ui/crumbs/hig.py: simplify subprocess call
According to Darren's suggestion, subprocess.call() will wait until the
subprocess complete. So simplify the code, use subprocess.call() to wait
command complete.

(Bitbake rev: 3dea9d5a5af82d99d337238981807a4cb1bd5b93)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai a87ce4308e ui/crumbs/hig.py: tweak strings
Add comments for DeployImageDialog 'standalone' part of codes to make it
easy to read.
And tweak some strings.

(Bitbake rev: b0e604d3d6dbfcaeac0a2e0e4399aeb4327f8cbc)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-14 14:07:17 +01:00
Kang Kai 0612cf3fcb hob2: create a standalone deploy image tool
[Yocto 2388]

Create a deploy image tool using the existing dialog including
DeployImageDialog and ImageSelectionDialog.

This tool writes bootable images to USB devices, and it can be run
directly without hob.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:43 +01:00
Kang Kai 7828e9eee2 hob2: update DeployImageDialog for seperated tool
Part of [Yocto 2388]

Update class DeployImageDialog to get ready for a standalone deploy
image tool. The standalone tool can be run directly without hob, and
add a button to select image file. So adjust the layout of
DeployImageDialog.

(Bitbake rev: 399cfbaf36ccd4b934e25f915e64b87f32a3eb82)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:17 +01:00
Kang Kai 87ce7bdfd5 ui/crumbs/hig.py: check deploy process return value
Update function response_cb of DeployImageDialog to get deploy process
return value. According the return value tell user that deploy image
successfully or not.

(Bitbake rev: f78f6d43a68e0f1dc4d3e4164eed453fcb9c22a8)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:17 +01:00
Kang Kai 0c9927865c ui/crumbs/hig.py: remove extra spaces
Remove extra spaces at the end of line or blank line.

(Bitbake rev: 70b75a05a806fecf8be15b9ba66fec2eb87dcce4)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Kang Kai 0b6bb93558 ui/crumbs/hig.py: fix run time error
Commit 094742bed2 re-implement the
function popen_read(). If there is no USB device, it crashes with
"ExecutionError: Execution of 'ls /dev/disk/by-id/usb*' failed with exit
code 2:"

Replace popen_read() way with glob module to get the USB devices.

(Bitbake rev: 0c43fe72e3c6a12ac19173d8cbbad81af21c2d85)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Kang Kai ac7b96420a ui/crumbs/utils.py: import module bb
When I try to call function which_terminal() of utils.py directly,
it complains NameError: global name 'bb' is not defined

So import module bb

(Bitbake rev: 9e370d9b1022112be2ac8f73feb182b1bba179b0)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Liming An 574b5ecfa5 Hob: fixed the index issue when set actived item for base image combo
The combo item index dosn't be increased as the insert a dummy item, when
execute the upadate base image combo operation.

[YOCTO #2500]

(Bitbake rev: 59e19634a84fcb4c34b92cdcf7a9ea807c9abb63)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:16 +01:00
Liming An e91f1e28bc Hob: Change 'run image' work flow and image detail screen as ui design
Added the qemu_image_kernel selection view box to image detail screen GUI, and
changed the 'run image' button clicked work flow.

[YOCTO #2155]

(Bitbake rev: d548eb8a03cfba5c64c018898972bc0a0bdb280c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang c0b92702d3 Hob: Interpret some special characters for label markup
Interpret some special characters for label markup, such as &, <, >, etc.
Otherwise, the message dialog can't show them, and worsely, it makes the
whole message blank.

[Yocto #2492]

(Bitbake rev: fb82f6eb5405274f702bd6d64cbe995fd4b74145)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang 25785d8ddf Hob: add versions for compatibility check between Hob and templates
If a user uses a very old version of Hob and does some work,
later on he/she upgrade to the latest version of Hob, because
Hob may change the settings (add more config option into the Adv.
Settings dialog or remove some), then the old templates are not
loadable and workable for the new Hob.

Even though the user hasn't save any template before, the Hob could
remember the settings between Hob sessions as a default template,
(Remember we have a bug to ask Hob remember between sessions?),
the new Hob will also load the default template.

By adding versions, we can easily to fix the issue. If the versions
don't match, Hob will remove the old default template first and
initiate a new build, which has very very little impact on the user.
(Just can't remember from the previous session after the user upgrades
to a new and incompatible Hob)

[Yocto #2492]

(Bitbake rev: d5dd9a7af9d35c588528f9937430d1ef5de216c6)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Shane Wang efd977010e Hob: lower the limitation for PyGTK
(Bitbake rev: d44af0185985cc46ba07a82875bbb4cd4a6d3dec)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:15 +01:00
Liming An 9703dcb398 Hob: fixed a definition not match issue when click choose directflb in package page
[YOCTO #2526]

(Bitbake rev: 3c285d386a4ca0a86798feb0c506673a2a312727)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Liming An c8c8d75f23 Hob: fix entry of recipe page can't be edited in case after clicked clear button
cancel some inviable code and fixed this issue

(Bitbake rev: d2e2c917e4a93ec7fd344a2c703d526ce7b690cf)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Liming An 6ac1545453 Hob: clear the repeated function get_kernel_file_name
there are a repeated function in builder.py and imagedetailspage.py,
so combine them to one.

(Bitbake rev: 4bada20cd244a2dd6d72acd38f0cadc90453e60b)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 12:13:14 +01:00
Paul Eggleton 534f31903b bitbake: include varflags in checksums
Add a dependency to each variable on a filtered list of its varflags.
This is intended to catch things such as SRC_URI checksums, varflags
controlling extra functionality from classes (e.g. the recently updated
update-alternatives class in OE-Core), etc. and ensure their values
influence the sstate checksums.

There is an exclusion list which needs to be set via bitbake.conf
(BB_SIGNATURE_EXCLUDE_FLAGS), if this is not set then the functionality
is disabled. The existing vardepsexclude mechanism can also be used to
exclude undesired varflags, but they must be fully specified, e.g.:

do_patch[vardepsexclude] += "do_patch[someflag]"

Implements [YOCTO #2517].

(Bitbake rev: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:32 +01:00
Paul Eggleton 43551f513d lib/bb/fetch2: ignore remote URIs when doing file checksums
Skip evaluating remote URIs when doing local file checksums, because we
don't need to process them and doing so will trigger a parse failure if
SRCREV is not fully specified. Whilst this is just delaying a check
until runtime (when do_fetch runs for the recipe) we're only validating
this here accidentally and if we did wish to check it during parsing it
ought to be done explicitly.

Fixes [YOCTO #2512]

(Bitbake rev: 99feb77c2de707f2d825566cf48371c48f450e3e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:32 +01:00
Paul Eggleton bb81db6f61 cooker: report recipe being parsed when ExpansionError occurs
When an ExpansionError occurs during parsing it is useful to know which
recipe was being parsed when it occurred.

(Bitbake rev: a2a8e8c9f5a1a30aacab696fd2b434939ee2c4e2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton f0809ed788 cooker: fix UnboundLocalError when exception occurs during parsing
Fix a recent regression where we see the following additional error
after an error occurs during parsing:

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/paul/poky/poky/bitbake/lib/bb/command.py", line 84, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1202, in updateCache
    if not self.parser.parse_next():
  File "/home/paul/poky/poky/bitbake/lib/bb/cooker.py", line 1672, in parse_next
    self.virtuals += len(result)
UnboundLocalError: local variable 'result' referenced before assignment

(Bitbake rev: 1ae0181ba49ccfcb2d889de5dd1d8912b9e49157)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton 64f88bf5d9 lib/bb/data_smart.py: don't report variable in ExpansionError if not set
If the variable name is not specified then don't confuse the error message
by starting off with "Failure expanding variable None...".

(Bitbake rev: 9cb16f3c73751e7cf6d495586a6193f06eb97b1f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Paul Eggleton 5a975239ea hob: handle sanity check failures as a separate event
In order to show a friendlier error message that does not bury the
actual sanity error in our typical preamble about disabling sanity
checks, use a separate event to indicate that sanity checks failed.

This change is intended to work together with the related change to
sanity.bbclass in OE-Core.

Fixes [YOCTO #2336].

(Bitbake rev: 24b631acdaa143a4de39c6e1328849660c66f219)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:31 +01:00
Liming An c8d78b2186 Hob: add the 'build new' be as the primary action for 'Image detail' page
As ui design, we should set at least one primary action for 'My Image' and
'Image detail' screen as the differnt selected image. if no 'run image' or
no 'save as template' or no 'deploy image' we should set 'build new image'

[YOCTO #2326]

(Bitbake rev: d848af637e9a14b627533bee65bf16f680dff854)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Liming An 6609a813bb Hob: Fixed a compatible issue for indicator icon view
Because some screen not support the alpha visual channel, so the function
'screen.get_rgba_colormap()' will return None, it's a compatible issue, so
change it by another way.

(Bitbake rev: e58ba1ad944ea1ba95a5ada80d4c88f0165bd1ca)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Robert Yang cc3da1236c HOB: 'str' object has no attribute 'close'
For builddetailspage.py:
  The "f" was a stream in the past, it is a string now, so it doesn't
  need f.close(), and change its name to "branch".

  And we don't need the "2>&1" since bb.process.run() can handle it, it
  will raise exception when error occurs, we should handle the exception
  ourselves if we want to ignore the error.

For hig.py:
  Use bb.process.Popen() since it doesn't need the return value. If we
  use bb.process.run(), the parent process will wait for the child process
  to terminate to get the result.

[YOCTO #2511]

(Bitbake rev: ab10f3da1976581c371c43cdb88f405cf6fbcd95)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:30 +01:00
Kang Kai 9b6d3f48d2 hob2: set beginning folders for FileChooserDialog
Set begining folders FileChooserDialog for the select images and
some local directory configurations. That may make user feel more
convenient.

(Bitbake rev: 047ad35c0c869883509557aeb982e0b784ad2e71)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 17:23:29 +01:00
Kang Kai f28209d9d3 cooker.py: terminate the Parser processes
[Yocto 2142]

Force to exit HOB when hob is parsing recipes, the bitbake doesn't stop.
It hangs on function BitBakeServerConnection::terminate in file
server/process.py:
    else:
        self.procserver.join()
It is waiting for the children process quit.

In stage of parse recipes BBCooker spawns Parser processes as many as
cpu numbers. When quit the Parser processes they make their internal
Queue to call cancel_join_thread() to avoid block but don't work at
this time.
So force to terminate the Parser processes.

(Bitbake rev: bebef58b21bdff7a3ee1fa2449b7df19144f26fd)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:39:33 +01:00
Paul Eggleton b52dfa23e1 lib/bb/fetch2: fix comments for verify_checksum
This function no longer returns a value, it raises errors instead, so
update the comments to reflect this.

(Bitbake rev: 8b61b9584a8b00378f9fd8f165dbd65dcfd3c14e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:12 +01:00
Richard Purdie e6d9af19d6 bitbake/exceptions: Handle reports from the field of exception code failures
Despite using python 2.6, there have been reports of issues where
bitbake is printing tracebacks with errors in the exception handling
code. This was masking the real error.

Since we need to do whatever we can to give the user good feedback about
errors, detect the tuple instead of namedtuple case and don't fault
in the exception handler but just give up trying to traceback any further.

In the reported cases, this gives a message the user can then understand.

(Bitbake rev: 9ec0429271e68527a55fc123dea5a1b959c6ec3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:12 +01:00
Richard Purdie 0b14db4524 bitbake/utils.py: Ensure utils.which() returns full paths
If the path passed to which contains empty elements, it will search
the current working directory for the file which is correct baheviour.

Various pieces of code assume the path returned is a full path though.
This commit ensures we don't return relative paths.

(Bitbake rev: 4de24ccc10e40cc088b8515095df59f69b12715d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:12 +01:00
Richard Purdie 2d3ff5e6e1 bitbake/cooker: Ensure matchFile returns full pathnames
We should always be passing full pathnames around within bitbake. If
a file was referenced as a relative path to the current working
directory, it might not get passed through the abspath call and
hence the cwd would not get added as a prefix.

This change adds a second pass at ensuring we only return absolute paths.

(Bitbake rev: 72fc62ca124a24e2dbe404a3c83a49608a7c7931)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:11 +01:00
Liming An f3a5ad170d Hob:fixed the issue of primary button is not an 'orange hob button'
In image detail page, the primary button should be an 'orange hob
button', there has a primary button is not, so change it.

[YOCTO #2326]

(Bitbake rev: 884a0b2d927404991b7e23d5bbfab096a5b7e849)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:11 +01:00
Richard Purdie 994ce7b071 BBHandler: Tweak some data store access methods to the preferred syntax
(Bitbake rev: d7ec0f90354e60c415a01429bf26746c1d63b7ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:15:11 +01:00
Shane Wang 49694d650c Hob: Adjust the progress bar and set 100% only when all is done.
After parsing recipes, Hob will populate recipes and packages, which is probably
time exhaused. So, this patch is to adjust the progress bar and ensure 100% is
set if and only if all populations are done.

The patch also fixes "weird 18 second delay when parsing recipes" on build appliance.
Because Hob is doing something, but the progress bar shows 100% and wait there.

[Yocto #2341]

(Bitbake rev: 2c4a21dc8a588c8cf05549ddd9734731a46bea10)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 18:17:02 +01:00
Mark Hatle 799e076938 build.py: Add support for log and run filename changes
The format of the log file and run file are now selectable
using BB_LOGFMT and BB_RUNFMT, respectively.

The following values may be used:

{task} - task name
{taskfunc} - task.func or func, if task==func
{func} - function name, only available in BB_RUNFMT
{pid} - pid

The log/run files may be placed into a subdirectory that
is relative to T.

Default BB_LOGFMT is: log.{task}.{pid}
Default BB_RUNFMT is: run.{func}.{pid}

(Bitbake rev: 588da606eb81c52cb92d29041e1c67897427bfdf)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 18:15:24 +01:00
Mark Hatle 63aaecb057 build.py: Add additional debug messages
We now add a debug message when entering and exiting a python or
shell function.  This makes it easier to inspect a log and figure
out the run order from the logs.

(Bitbake rev: a0f554d0e722b6705844c6031fdcafa5d1a1c8a7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 18:15:23 +01:00
Mark Hatle d0de551d44 build.py: Cleanup exec_func_shell
exec_func_python and exec_func_shell are similar, but variable
usage has diverged sync the two up.  Since exec_func_python is first
use that as the guide for the later exec_func_shell variable naming.

(Bitbake rev: ccfe1a3a2419172799957676107f240badf3f062)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 18:15:23 +01:00
Mark Hatle c9e38aed29 build.py: Add a log to capture task execution order
The new log.task_order contains an ordered list of the tasks as they
were executed in any given recipe.  The format of the lines is
<task> <pid>: <log file>

(Bitbake rev: 8662b43dcbd6e38a5b2ab9d6529af1fb08c146bf)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 18:15:23 +01:00
Robert Yang 094742bed2 replace os.popen with subprocess.Popen
Replace os.popen with subprocess.Popen since the older function would
fail (more or less) silently if the executed program cannot be found

There is a bb.process.run() which will invoke the Popen to run command,
use it for simplify the code.

For the:
p4file = os.popen("%s%s files %s" % (p4cmd, p4opt, depot))
...
for file in p4file:
    list = file.split()

in bitbake/lib/bb/fetch2/perforce.py, it should be an error in the past,
since it didn't use readline() to read the pipe, but directly used the
split() for the pipe. Use the bb.process.run would fix the problem since
bb.process.run will return strings.

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2075]

(Bitbake rev: 8d6700255a6d4dda403c89b171a6d4a1883e5aae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:11 +01:00
Robert Yang 10a0f9ed92 replace os.system with subprocess.call
Replace os.system with subprocess.call since the older function would
fail (more or less) silently if the executed program cannot be found

More info:
http://docs.python.org/library/subprocess.html#subprocess-replacements

[YOCTO #2075]

(Bitbake rev: f5b3bf115dc1ffbfb241a49cec0fc3654cb71021)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:11 +01:00
Enrico Scholz 358016f463 bitbake: support $BITBAKE_UI environment
Patch adds support for a $BITBAKE_UI environment variable which allows
to configure the preferred user interface. Although an '-u' option
(which will override the environment variable) exists already, it was
required to specify this option on every invocation of bitbake.

Because user interface is instanciated very early in the program it is
not possible to use bitbake.conf for setting up a default.  An
environment variable (which acts in a similar category like $PAGER or
$EDITOR) is a simple way for configuring the default.

(Bitbake rev: e3c213015953d1a0afb5ef4be59e1264990e5cee)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:11 +01:00
Paul Eggleton 8b8be74ed2 bitbake: implement checksums for local files in SRC_URI
Gathers a list of paths to have checksums calculated at parse time, and
processes these when calculating task hashes. Checksums are cached with
the file's current mtime. Thus, changing any local file in SRC_URI will
now cause the do_fetch taskhash to change, thus forcing a rebuild.

This change adds very roughly about an 8% increase in parse time (a few
seconds) and maybe a few seconds during runqueue generation, so a fairly
moderate performance hit.

Note that since paths are resolved at parse time, this will not force
a rebuild when files are introduced which would cause that resolved path
to be different - for example, where a machine-specific version of a file
was added without otherwise changing the recipe. This will need to be
handled in a future update.

Code to hook this into the signature generator was courtesy of
Richard Purdie <richard.purdie@linuxfoundation.org>.

Implements [YOCTO #2044].

(Bitbake rev: c993b7c457f8b7776e8a5dff253bfa0724bc2cae)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:35:04 +01:00
Paul Eggleton d7b818b51f bitbake: refactor out codeparser cache into a separate class
We want to be able to reuse most this functionality for the file
checksum cache.

(Bitbake rev: 0fe3cb1438d297f90dd0fc6b26362ecbff75c76d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 644b30adfb Hob: fixed the issue about the 'run image' page should have the primary bug
issues: when build a image for atom-pc, the output does not include live
image, and 'Save as template' should become the primary action on the screen

[YOCTO 2326]

(Bitbake rev: e9516c7e14d782b943cc6e6a2e5e2111edf03d8c)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 3ee1cfab7d Hob: fixed the line width of base image description view
As ui design, adjusted the line width for each base image description

[YOCTO 2310]

(Bitbake rev: 8bce98b23bc9cbc4da4464bfbaeb4e1a1aaca5c5)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 0d210ff8e8 Hob: fixed the issue about bug 'running image' workflow and related view
[YOCTO #2155]

(Bitbake rev: 5e14cb41e8ba26a3114ea2c8b8f83b271bc44b54)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:18 +01:00
Liming An 374ad22550 Hob: change the build failure scenario as ui design
change the top bar display in build 'issue' page

[YOCTO #2183]

(Bitbake rev: 0705d3db1ce6d0f29301e2428c990ab0d9b2860e)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-23 11:33:17 +01:00
Liming An 39a9267dee Hob: add '--select a machine--' and '--select a base image--' to GUI
[YOCTO #2175]

(Bitbake rev: 2729729012f035043fedc5098be2ec12b761166d)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 14:56:17 +01:00
Christopher Larson 532f96ddcc fetch2: quote/unquote url paths
This ensures we can handle things like %-encoded characters in the path
portion of urls.

(Bitbake rev: b1dbc24ebcc4e5100c32568c2c41fd982fb4bcce)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 14:56:16 +01:00
Dongxiao Xu 5c880fb301 Hob: Get image name internally when updating the image description
The image name shouldn't be passed from outside caller, since the image
name may not in the combobox list. Getting the name from
update_image_desc() internally.

(Bitbake rev: 6635cd7bc2a448d1324e9344100f97613f4272b5)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 14:56:16 +01:00
Dongxiao Xu 7690c45c71 Hob: Add filter for images listed in image combo
Define BBUI_IMAGE_WHITE_PATTERN variable to indicate which image is
allowed to be displayed in image combobox.

Define BBUI_IMAGE_BLACK_PATTERN variable to indicate which image is NOT
allowed to be displayed in image combobox.

This fixes [YOCTO #1581]

(Bitbake rev: 960461bc12945675af3081eb469f932f4a6eb1cd)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 14:56:16 +01:00
Shane Wang e069e53536 Hob: reimplement the proxy page
This patch is to reimplement the proxy page in the "Advanced Settings" dialog
per the new design in https://bugzilla.yoctoproject.org/attachment.cgi?id=442
and https://bugzilla.yoctoproject.org/attachment.cgi?id=443.

[Yocto #2247]

(Bitbake rev: 911a60c09c1539a3f10c2bcdb26d40e458c31303)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 14:56:15 +01:00
Richard Purdie 33c4bf2096 fetch2: Also exclude urls containing wildcards from checksumming for now
Without this change, bitbake will try and checksum a wildcard which
will lead to fetch failures.

(Bitbake rev: ac53b88be58b0bed21730c0b61a8fc8e801a2f1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-22 12:18:53 +01:00
Andrei Gherzan f99ac52202 bb/fetch2/__init__.py: Don't try to compute checksums for directories
In this way we avoid failing the build while trying to fetch local
directories.

[YOCTO #2475]

(Bitbake rev: 39adb5741d9eee0879d3181be505400dffc60804)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-21 09:59:00 +01:00
Joshua Lock b4c8c74a45 hob: update required pygtk to 2.22.0 and gtk+ to 2.20.0
(Bitbake rev: e67ccbbeaecd2d9f3267995c590052c6a3c5b9ce)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:26 +01:00
Joshua Lock f9bffcab85 lib/bb/ui/crumbs/[package|recipe]selectionpage: include button
The indication of the included packages/recipes in the top right of the
GUI, per design, is a button which switches the Notebook to the included
tab.

(Bitbake rev: 494534cae6211d9055098562df1f35b56858f3ec)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:26 +01:00
Joshua Lock f9aa3dadb1 lib/bb/ui/crumbs/imageconfiguration: fix combo boxes drop-down width
The width of the combo boxes drop down should match the combo box
itself.

(Bitbake rev: 93e66f494730d0840dd1d4f3ed924d91e6489995)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:25 +01:00
Joshua Lock 9e59dea411 lib/bb/ui/crumbs/hobwidget: use light text in HobIndicator
Dark text on a dark background is difficult to read. Further the design
document uses white text.

(Bitbake rev: a84304ccf06a012817a5e6495d53147efcbed960)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:25 +01:00
Joshua Lock 44a40f7a56 lib/bb/ui/crumbs/: replace custom HobNotebook
The custom HobNotebook widget was implemented to address perceived
deficiencies in the gtk.Notebook API.

Recent inspection reveals that the API is capable of all that Hob
requires of it and therefore maintaining a custom class to provide
similar functionality does not make sense.

Addresses [YOCTO #2276]

(Bitbake rev: e683caa9863bbb52480346669806f22173629a5e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:25 +01:00
Liming An 881b81f266 Hob:add function about clicked a row to load image file for 'my images' page
[YOCTO #2238]

(Bitbake rev: b72ee3cf29a5badca3f8c1342356164270615aad)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:24 +01:00
Liming An e80c1a3708 Hob: Apply a line length to consistantly display image descriptions
[YOCTO #2310]

(Bitbake rev: e9d65e06aaf20bd9f5ca02544c1bf976c6bff9be)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:24 +01:00
Enrico Scholz 05330d0665 knotty2: return exit code
'bitbake -u knotty2' never failed which was caused by main() not
propagating the exit code.

(Bitbake rev: 243e4ba405b88fd466bec7b4aa042d20aa6121ff)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:24 +01:00
Richard Purdie b0b9ee29a2 bitbake/fetch: Spell out which fetcher backends support and recommend checksums
There were some hardcoded behaviours in the system for which backends
support checksums verses which backends recommend them verses which
don't recommend them.

This moves the functionality into specific fetchers and then makes the
general code generic. This cleans up the codebase and fixes some corner
cases such as trying to checksum directories returned by the git fetcher.

(Bitbake rev: ef6d268f7b8527541a7fb044cf95a973be4097f4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:23 +01:00
Richard Purdie 311c68bd06 bitbake/fetch: If checksums are available, check them for any file, local or remote
Currently, checksums are only checked for remote files. This changes
the check to apply to any file we have checksum data for. A mismatch
against a file is fatal but in the local case, no warnings are shown
about missing checksums.

(Bitbake rev: 80411b3acf2173a4a7d415102d16676eb98363e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:23 +01:00
Richard Purdie 2f009e5b1e bitbake/fetch2: Improve visibility of checksum warnings when fetching from mirrors
When fetching from mirrors, checksum errors would get buried in the
logs. This raises their profile so a warning is logged on the console
when fetcher checksum issues are encountered, even if other attempts
are made to get the file (which may or may not have the same issue).

(Bitbake rev: d43fafd7f01b5534499b45213197d8ccececdbc4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:23 +01:00
Richard Purdie d993f172e8 bitbake/fetch2: Improve stamp creation in mirror code
Under certain contitions such as local file:// mirrors of all files,
bitbake might not check checksums. This is not desirable and we should
always check the checksum where possible.

This only exception to this is the git mirror tarball case where the
checksum is unknown but we need to create the .done stamp for other
reasons. This patch preserves thta functionality but in a more specific
section of code where this doesn't interfere in normal checksums.

(Bitbake rev: 2592a43e422c06a6f6174ada562e9c8ba25e1ec1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:22 +01:00
Richard Purdie 2a167cb1fe bitbake/fetch2: Remove hardcoded file removal and use clean method
Under certain circumstances, bitbake could remove files which were
outside its control since it unconditionally removes ud.localpath.
In the file:// case this can point at external paths.

This patch converts it to use the clean() method which will remove
files when its safe to do so but not in the file:// case since the
file:// handler has an empty clean method. This means bitbake no
longer removes files outside its control and is generally much safer.

(Bitbake rev: 9ad1cebe2220b41da2141cdb3f0a403abb46d77c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-20 09:24:22 +01:00
Joshua Lock 63ccc3f266 lib/bb/siggen.py: ensure dumped signatures have group R/W
We anticipate signatures being shared amongst peers in a group so ensure
they have rw-rw-r-- permissions to facilitate this.

(Bitbake rev: e4716f316152cafabebcefec7b387edeb02ad3eb)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:54 +01:00
Joshua Lock fb7fa0159e lib/bb/siggen: use open() rather than the file constructor
The Python documentation states:
 "When opening a file, it’s preferable to use open() instead of invoking
the file constructor directly." [1]

Further in Python 3 direct use of the file constructor is no longer
possible.

1. http://docs.python.org/library/functions.html#open

(Bitbake rev: 759f953e29a7131614e5b1f0312edf2b17523675)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:53 +01:00
Richard Purdie 09b231deb1 bitbake/tests: Add test of the git fetcher
(Bitbake rev: 4dd2655caef1003b51c0600397a91f1c9526a67f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:53 +01:00
Richard Purdie 36462d5927 bitbake/fetch2/git: Set a default for the GITDIR variable
(Bitbake rev: 1a0cdc65812f1f12bf4bbea6540a3aaf0f81b4f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:53 +01:00
Richard Purdie 279d0afd6e bitbake/fetch2/git: Don't set the branch name to None, that makes no sense
With floating revisions and no specified branch, the fetcher could fail
with some obtuse errors. This was due to the branch name being set to None
which makes no sense. This patch reworks some conditions to avoid this.

(Bitbake rev: 740c58d43cfb1445dd126e4827bb70ce988ca107)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:52 +01:00
Richard Purdie 59ca57cd23 bitbake/runqueue: Drop check_stamp_fn, it's obsolete and should not be used
This function was used by old code such as packaged staging but is thankfully
obsolete now and replaced with better mechanisms. Its time to remove it and
the horrible internal only variables associated with it.

(Bitbake rev: 2995b8d551e0532eca20f8862730acd062c608ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 11:54:27 +01:00
Richard Purdie be4f8e368c bitbake/runqueue: Drop check_stamps function, it is obsolete and unused
This was originally used to check the consistency of the stamps in one function
call. This turns out to be inefficient, unnecessary and if it were necessary,
check_stamp_task() could be called in a loop. The function has been unmodified
for a while and likely contains bugs. Its best simply removed.

(Bitbake rev: 728ffde1bd69b880d48fe8523b1616956d13616e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 11:54:26 +01:00
Richard Purdie d48d8aa1e7 bitbake/runqueue: Fix 'full' stamp checking to be more efficient and cache results
This should fix issues where bitbake would seemingly lock up when checking
certain configurations of stampfiles.

The cache is kept within the runqueue since that feels like the right
place to associate this cache data.

(Bitbake rev: e95755c4931b26d9f8102ed3652dff969145cfc9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 11:54:26 +01:00
Christopher Larson 4a2147f54f runqueue: drop unnecessary keys() in runqueue_process_waitpid
(Bitbake rev: d03dc07dea2f4e594fdbe4abe618670fe628a7c9)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 11:54:26 +01:00
Christopher Larson e2c58b40d1 runqueue: handle task exit due to signal/stop
- for a normal exit, use WEXITSTATUS, rather than manually shifting
- for exit via signal, set the exit code to 128+N, per shell convention
- if a process was stopped, return and don't handle it, as the process can yet
  be continued

This should fix the case where bitbake says a task failed with an exit code of
0 (we assumed failure based on the overall status, but didn't pass all the
information along to task_fail).

(Bitbake rev: 84ea614bc56d35a414eb5bf5658891b340bfc569)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-11 11:54:26 +01:00
Liming An 6841abd172 Hob: change the workflow about click 'Run Image' to run directly after builded a qemu image
[YOCTO #2155]

(Bitbake rev: d8a1fc4613ce1d6c1d0e3dad53d7af15b2011fd5)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-09 21:56:47 +01:00
Liming An 71b277acb1 Hob: add group number show and 'bold' visible effect for Package view
as ui design, add number of packages for each group, and make the
text font to 'bold' when row be selected

[YOCTO #2195]

(Bitbake rev: 5812176a679a39a4d096134c871c3d24a7e505ea)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-09 21:56:46 +01:00
Liming An a75562aa8b Hob: add original url show function with the tooltip hyperlink for user
When case about No browser, such as running in 'Build Appliance', user can't open
the hyper link, so add this work around for user. (Checking the browser is avaiable
or not is hard by different system and browser type)

[YOCTO #2340]

(Bitbake rev: 02cc701869bceb2d0e11fe3cf51fb0582cda01b0)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-09 21:56:46 +01:00
Liming An cb9be92350 Hob: change the refresh icon speed to make it view clear
Because the arrow icon refresh so fast as the go backward by illusion, so adjust it slow.

[YOCTO #2335]

(Bitbake rev: ac4a8885fafdc0d1e79831334ead9a8ddb6e2472)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-09 21:56:46 +01:00
Dongxiao Xu 7a49d88d22 Hob: Clear the building status if command failed
We may meet certain command failure during build time, for example,
out of memory. In this case, we need to clear the "building" status.

This fixes [YOCTO #2371]

(Bitbake rev: 283dbbbf5d34adb4c9e3aa87e3925fdebe21ff42)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:01 +01:00
Richard Purdie b478649e49 bitbake/tests/fetch: Add simple http fetcher tests
(Bitbake rev: 27b89561781f19fd95308433bec06fa8b7b354e8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie d4d4aab8dc bitbake/fetch2/wget: Add fallback/default wget commands
(Bitbake rev: 9586808572d06de4127f6a524e87e9ad75232423)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie c77bcfbfe3 bitbake/fetch2/wget: Remove unneeded function indirection and reindent
(Bitbake rev: 769b92b14a1dfbbf697b8f4bf9a5a828807fd885)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie 3d74d5eed9 bitbake/fetch2/wget: Remove unnecessary use of OVERRIDES
This allows some simplifications of the function and is slightly faster.

(Bitbake rev: 5999dc9985ad087c036611bfaa59b090a08781a6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie c9da0e31f8 bitbake/fetch2: When unpacking, only use PATH variable if its set
(Bitbake rev: ffec38675c0d78ee9fcd1d8f5a746d162145554e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie 2605ca19c5 bitbake/fetch2: Remove WORKDIR reference, should use passed parameter
(Bitbake rev: 9384dfaf644365c731be26572443287ce8f190b2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 11:03:00 +01:00
Richard Purdie 7f11bbb9bb bitbake: Fixup bitbake-selftest
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 17:41:47 +01:00
Richard Purdie 12ebec4c94 bitbake: Add start of bitbake regression/self testing
This adds some basic unit testing for the codeparser and data store code. Many of
the actual test cases were taken from work by Chris Larson's OE-Signatures work but with
changes to adapt to the current bitbake APIs we need to test.

I also imported CoW tests written by Holger Freyther from the original bitbake-test
codebase: http://svn.berlios.de/wsvn/bitbake/trunk/bitbake-tests/tests/ and
some tests from the doctests that were removed in commit:
http://git.openembedded.org/bitbake/commit?id=3a11c2807972bbbddffde2fa67fc380d159da467

(Bitbake rev: ae4a95780e3e08cf73c854efa8cd93379e00c4e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 16:58:35 +01:00
Richard Purdie dfd0116a52 bitbake/utils: Convert vercmp_string() to use vercmp internally
Having two different version comparision algorithms in bitbake has never seemed
like a sensible idea. Worryingly, they also return different results to each other.

The vercmp_string API is relatively unused with no users in OE-Core or BitBake
itself for example. This patch converts it to use vercmp internalls, bringing
consitency to the comparisions which is easy now we have other recently added
functions. Yes, this changes behaviour but in this case I'd prefer we were
consistent than having two different comparisions.

(Bitbake rev: a569c816e016447d60624c59a750709d59a0f455)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 16:44:57 +01:00
Jeff Polk 1c34d5822d bitbake/fetch2: Fix spelling error in network access error message
(Bitbake rev: b766630ed7e099fffe817928a2811272677a1b26)

Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 16:44:57 +01:00
Jeff Polk ca8e06e8a0 fetch2/git: Allow file:// URLs without checking for network access
Don't check for network access before grabbing the the current head,
cloning, or updating a clone when the protocol is 'file'.

(Bitbake rev: d5847bc5254b9d2f28a6b574f6157d1286add27c)

Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 16:44:57 +01:00
Richard Purdie 0c243d399a Update version to 1.15.2 (correspdoning to Yocto 1.2 release)
(Bitbake rev: 270a05b0b4ba0959fe0624d2a4885d7b70426da5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-01 20:50:41 +01:00
Dongxiao Xu 2a6e1b0a0c Hob: Issue sanity check after parse is completed
In original scheme, sanity check is part of the parsing process. If a
sanity check fails, it means the parsing is failed and values in Hob
GUI may not correct.

With this commit, Hob will actively issue sanity_check() after the
parsing is completed.

This fixes [YOCTO #2361]

(Bitbake rev: 36968815dcc91759eeacb308bf4b294af416eee5)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-24 10:14:48 +01:00
Dongxiao Xu 544553b12b Hob: Add proxy setting into setting's md5
If user changed the proxy setting, we will reparse configuration because
it may need sanity check.

(Bitbake rev: 0be54917cd88ea8f110027a7840ac69a411fd589)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-24 10:14:48 +01:00
Dongxiao Xu 86abb3699a event.py: Add SanityCheck and SanityCheckPassed events
(Bitbake rev: 4d7bf9d813229b78b1cd87d06f7042e7923b7db4)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-24 10:14:47 +01:00
Joshua Lock 7ddb8c8b68 hob: enable sanity checks after launch
To ensure the users configuration is sanity tested enable the sanity
checks after the GUI has started but before any parsing is done.

(Bitbake rev: 244ce2b900ae6cecbeeccfe2056e61c132476261)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-23 23:04:22 +01:00
Joshua Lock 20ff9db921 lib/bb/ui/crumbs/recipeselectionpage: fix type availabel->available
(Bitbake rev: 1a39698ab8498410d159c665c015f9297f153797)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 16:41:48 +01:00
Paul Eggleton 04d6aa1069 bitbake-layers: hide deprecation warnings
There are a number of DeprecationWarnings within BitBake code which
bitbake itself filters out; bitbake-layers was not doing this, resulting
in a stream of warnings printed out when used with Python < 2.7 (these
warnings default to disabled on version 2.7 and above.)

(Bitbake rev: 0a2378237f07eb1c812e2308e64b7d70781e2b39)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Beth Flanagan 993c467510 hoblistmodel.py: description for selfcreated image
The current description is empty. This adds a default
description for hob's dummy_image.

(Bitbake rev: 68a65e5eeeb01d78444f1e5b5d1bb7b21c9d0b2c)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Dongxiao Xu 139a91d742 Hob: Set the "stop" button insensitive before hide it
If user stops a build, we need to firstly set the button insensitive and
then hide it. This ensures the button's init status is "insensitive" in
next build.

(Bitbake rev: ea37272ccc28d6e24b48286e5c4c3edbad1d57cd)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Dongxiao Xu c50d8b753d Hob: Enlarge the upper value of image size
Originally the upper value for image size and extra size is 1024M, which
is relatively small. Enlarge it to 64GB.

Besides, fix tooltip for toolchain build.

(Bitbake rev: 99f01305b4c2253567a1a13a33339b1755a86e6d)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Dongxiao Xu c27655793b data_smart: Improve the calculation of config hash
For config hash, we put the keys in structure of "set()", which is not
order sensitive. Therefore when calculating the md5 value for config
hash, we need to identify the order of the keys.

(Bitbake rev: 0f1b142a3f6b8125bf023c2e5ec269618869abf7)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-17 11:41:31 +01:00
Liming An 5326847ef8 Hob: fixed a little view issue about package selection page
In package selection page, treeview cell data callback function not cover the 'else' case, so parent item will render the pervious value.

(Bitbake rev: 98694c1dbc276cc151f393db67bfd43442da28ba)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-16 12:56:25 +01:00
Liming An e966ae128a Hob: add the parent window to 'binb' popup window for managing it
The 'binb' popup window should be "set transient for" the main application
window which they were spawned from.

(Bitbake rev: a6f45b23851e22c7793d9a534fd197316bb5b9b8)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-16 12:56:25 +01:00
Liming An 6d7aae9e97 Hob: fixed the issue that the notebook overlay-scrollbar is overlapped
In those systems which had use gtk overlay-scrollbar feature,such as
Ubuntu 11.10, we have the issue with the multiple overlaped scrollbar in
'Recipe View' notebook or 'Package View' notebook, this patch is going to
fix it.

(Bitbake rev: f6be78d8a45dc501c2bbe1e1a399a342dabe11d5)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-16 12:56:25 +01:00
Dongxiao Xu d5a9ff4b27 Hob: Fix contents in imagedetailsscreen
This commit fixes the contents in imagedetailsscreen, which lacks some
kind of image types, e.x., iso and hddimg.

(Bitbake rev: 4505097f4f7834857a6086d5dabeedb24b49cf4c)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-16 12:56:25 +01:00
Shane Wang 2e01a44f3b Hob: add exception handling
Create a wrapper with exception handling to call self.server.runCommand() safely.
Again, add exception handling to load_template() and save_template()

(Bitbake rev: cb07a027d3366ed30b0f7e5e85d08c6fda4eb5b9)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-15 17:31:57 +01:00
Dongxiao Xu e3e6d2a744 Hob: Simplify the init process
This commit merges some functionalities together and avoid unnecessary
signal handling. This can help to speed up the Hob startup.

(Bitbake rev: e5a6eb4f007bf270f2fddc814eb856da46e20eee)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-15 17:31:57 +01:00
Dongxiao Xu 74211e0372 Hob: Handle NoProvider event in runningbuild module
If NoProvider event is received, we will handle it in runningbuild
module and send notification to Hob instance, avoiding stepping into the
final page with no image built out.

This fixes [YOCTO #2249]

(Bitbake rev: 067bc46a0fbc542fef1fcaa406ad3737a4c5a55a)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-15 17:31:57 +01:00
Shane Wang 9ff001cba1 Hob: reset user recipe selection and package selection after settings are changed
Reset user recipe list and package list after the user changes the settings and
triggers recipe reparsing.

This is to continue to fix the bug [Yocto #2255]

[Yocto #2255]

(Bitbake rev: 95f4e9dc351f67442844ff52f90fc154fa95ba95)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:48:48 +01:00
Shane Wang 62c908c88b Hob: remember layers and settings between Hob sessions
This patch is to remember layers and settings between Hob sessions, which
includes:
 - Put some variables for the build details screen from Configuration to
   Parameters because they are not actually for build but for show
 - We create a dummy Configuration instance and a dummy Parameters instance
   in __init__ of builder
 - The two instances will be assigned the real values by
   update_configuration_parameters() after parsing (in the event callback)
 - When it is the first time to launch Hob in a build directory, nothing is
   remembered since everything is fresh.
 - The feature is implemented with templates, and based on the hook for Hob.
 - When the user changes the layers or the settings, a default template file
   is saved into ".hob/".
 - Later on, the layers and the settings are remembered by loading the default
   template automatically.

(Bitbake rev: f7c874ab930b9e7f95e79d0e84e62eb9b967f566)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:48:48 +01:00
Dongxiao Xu 276b86509b Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build"
Originally we use hardcoded "build" as the default task. This commit
fixes it by using BB_DEFAULT_TASK.

This fixes [YOCTO #2283]

(Bitbake rev: 7540f8d446345559ea9b47f4ff71d203ffdfaf8d)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 14:43:24 +01:00
Dongxiao Xu fdb2027e6d Hob: Build selected image if not customized
If user selected a base image and didn't customize it, Hob will still
build the selected image instead of hob-image.

This fixes [YOCTO #2253]

(Bitbake rev: a74a6a033e66a0ae7b47c84d842bdd54066c69a1)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 14:43:24 +01:00
Dongxiao Xu 83cc0a118f Hob: Save the original image name into template
Previously we use the template file name as the image name. This commit
changes to use the original selected image into template file.

(Bitbake rev: 14a9da66fe08d181f45853c52e0c9f14773070a8)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 14:43:24 +01:00
Richard Purdie ac998632f7 Hob: A minor fix on tooltip
(Bitbake rev: b1449ce6ccf4e33eb2fd34829d2c435a464ae88b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 14:43:23 +01:00
Lianhao Lu fb918fb4db Hob: Added required packages for toolchain.
Added the requried packages task-core-standalone-sdk-target(-dbg) for
building toolchain.

Fixed bug [YOCTO #2274]

(Bitbake rev: 434fdb3913cc78e2e9cdeede4c4fa7f1c8ef8892)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 12:04:19 +01:00
Lianhao Lu 811f7d8ebf bb.utils: Modifed vercmp() to meet Debian rules.
The version compare function vercmp() was not exatcly conforming to
Debian rules, e.g. it reported 'r1' > 'r1.1' but the Debian rules says
'r1' < 'r1.1'; it didn't support the "~" either.

Modified the vercmp() to meet Debian rules, so that it's compatible to
the rules used in opkg.

This part of the buf fixing of [YOCTO #2233].

(Bitbake rev: 97b610c54c60b5a40fa7f6a09fa23ce17b38f93a)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 12:04:19 +01:00
Shane Wang 4997801bad Hob: forbid users to exit Hob directly when Hob is busy
When Hob is busy with generating data, exiting Hob is not allowed.
That should be reasonable because at that time the mouse cursor is not a pointer.
If users want to exit, they can click "Stop" first and then do exit.

That is also a walkaround for [Yocto #2142]

(Bitbake rev: ad7f6bf3c7c4c15d546781aaefdaf03f00193f7c)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 12:04:19 +01:00
Dongxiao Xu 9c1dcdceb2 Hob: Implement Hob config parse hook
To make Hob's specific variable settings take effect, we add a Hob
config hook at the end of parsing for each configuration file, and in
the hook function, Hob will set its own variables to the data store.

This fixes:
[YOCTO #2210]
[YOCTO #2254]

(Bitbake rev: 0ec7d1bbfd2e09ae60f99e6134b20ffd1d9145b1)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 12:04:19 +01:00
Richard Purdie 302f2cc8ce ConfHandler.py: Add a hook for config parsing
To make the UI settings take effect, we need to hook at the end of each
config file parsing and set UI specific values.

(Bitbake rev: f54e733c7863110896f43900d9e4e791602f9d65)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13 12:04:18 +01:00
Shane Wang d74c5aa2c9 Hob: fix the missing functions
The patch is to correct 7e5d41ab22
(Bitbake rev: b6e68019494044305ab28492a517d1eafea851c3) to fix the
missing functions.

[Yocto #2281]

(Bitbake rev: 3c2808b67384e92601cbd66877c36ca40df7c7ba)

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-12 15:57:04 +01:00
Joshua Lock 7e5d41ab22 packageselectionpage: add missing method
This is just a copy of the same method from the recipeselectionpage so
that we can actually run hob again.

Fixes [YOCTO #2281]

(Bitbake rev: b6e68019494044305ab28492a517d1eafea851c3)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-12 08:12:07 +01:00
Saul Wold 376bf4a390 builder: fix missing \ for if continuation
(Bitbake rev: f44f12b812d246da994519bc39789bf2dcfbac4b)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-12 08:11:30 +01:00
Saul Wold 9789ed626b hig/builder: use the new which_terminal() function
Also adjusted the cmdline ordering to work correctly
with both xterm and vte.

(Bitbake rev: 4219e2ea033232d95117211947b751bdb5efafd4)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 17:58:51 +01:00
Saul Wold 4be09eec6a ui/crumbs/utils.py: new file for choosing terminals
Adding this simple version of a terminal selector for use
hob since it's needed. Moving forward in the 1.3 release
the existing code in meta/lib/oe/termnial.py will be migrated
to core bitbake code and this will use that code.

(Bitbake rev: 359a9ea4c8d61247064db3eaefb816ef116d332a)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 17:58:49 +01:00
Liming An 9067f7bfc2 Hob:Fixed some incorrect values of Build configuration tab
Because some variables not be updated when building started, so add them
to the updating function of configuration class, and add reset function of
configurate treeview of building detail page

[YOCTO #2244]

(Bitbake rev: 06ce753fd4680a204ccc63949ace637dc1c115e2)

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 00:05:23 +01:00