bitbake.git
7 years agoUpdate version to 1.15.3 1.15.3
Richard Purdie [Thu, 19 Jul 2012 08:54:13 +0000 (09:54 +0100)]
Update version to 1.15.3

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: Warn upon finding tab indentation in python functions
Richard Purdie [Wed, 18 Jul 2012 11:35:11 +0000 (11:35 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/svn.py: Use protocol parameter to get the protocol
Martin Jansa [Tue, 17 Jul 2012 22:38:19 +0000 (00:38 +0200)]
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__

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohob2: add elf to hcc supported image types
Kang Kai [Tue, 17 Jul 2012 06:58:52 +0000 (14:58 +0800)]
hob2: add elf to hcc supported image types

[Yocto #2709]

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

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agosiggen.py: Insure .siginfo files writes into shared sstate cache are atomic
Jeffrey C Honig [Tue, 17 Jul 2012 00:48:57 +0000 (20:48 -0400)]
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.

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue.py: Improve error output to be more useful when non-existent tasks are found
Richard Purdie [Mon, 16 Jul 2012 14:57:22 +0000 (15:57 +0100)]
runqueue.py: Improve error output to be more useful when non-existent tasks are found

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/__init__.py: Warn user if SRC_URI is using "proto" and not "protocol"
Andrei Gherzan [Tue, 10 Jul 2012 21:34:17 +0000 (00:34 +0300)]
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"

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/bzr.py: Use "protocol" parameter to get the protocol
Andrei Gherzan [Tue, 10 Jul 2012 21:34:16 +0000 (00:34 +0300)]
fetch2/bzr.py: Use "protocol" parameter to get the protocol

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/hg.py: Use "protocol" parameter to get the protocol
Andrei Gherzan [Tue, 10 Jul 2012 21:34:15 +0000 (00:34 +0300)]
fetch2/hg.py: Use "protocol" parameter to get the protocol

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/osc.py: Use "protocol" parameter to get the protocol
Andrei Gherzan [Tue, 10 Jul 2012 21:34:14 +0000 (00:34 +0300)]
fetch2/osc.py: Use "protocol" parameter to get the protocol

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: Abort build if runtime dependency conflict
Wenzong Fan [Wed, 11 Jul 2012 03:28:11 +0000 (11:28 +0800)]
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]

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/wget: Use FETCHCMD_wget to provide the commandline and options
Richard Purdie [Mon, 9 Jul 2012 16:44:08 +0000 (16:44 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/cvs.py: Switch to use FETCHCMD_cvs and handle parameters in the fetcher itself
Richard Purdie [Mon, 9 Jul 2012 16:43:27 +0000 (16:43 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/cooker: Print which pkgs would be built in -g output
Robert Yang [Thu, 21 Jun 2012 02:28:54 +0000 (10:28 +0800)]
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agousermanual: Fix missing markup
Robert P. J. Day [Thu, 5 Jul 2012 23:58:52 +0000 (19:58 -0400)]
usermanual: Fix missing markup

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agodata_smart: Fix multiple override interaction with append and prepend operators
Richard Purdie [Wed, 4 Jul 2012 15:47:52 +0000 (15:47 +0000)]
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue.py: Fix recursive task pruning to only prune self referencing tasks
Richard Purdie [Wed, 4 Jul 2012 16:39:11 +0000 (16:39 +0000)]
runqueue.py: Fix recursive task pruning to only prune self referencing tasks

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/svn: Enhance to cope with subversion 1.7 upgrade
Richard Purdie [Mon, 2 Jul 2012 20:23:04 +0000 (21:23 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agousermanual: Improve task dependency documentation to match reality
Richard Purdie [Mon, 2 Jul 2012 15:36:08 +0000 (16:36 +0100)]
usermanual: Improve task dependency documentation to match reality

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue.py: Allow recrdeptasks that have self references
Richard Purdie [Mon, 2 Jul 2012 12:29:53 +0000 (13:29 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fixed some variables not clean bug in detail page
Liming An [Tue, 3 Jul 2012 11:15:55 +0000 (19:15 +0800)]
Hob: fixed some variables not clean bug in detail page

[YOCTO #2679]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogit: do not execute 'git remote prune'
Enrico Scholz [Sat, 30 Jun 2012 19:34:56 +0000 (21:34 +0200)]
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.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: change 'run image' and 'deploy' Gui and work flow for building detail page
Liming An [Thu, 28 Jun 2012 11:55:31 +0000 (19:55 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue.py: Handle multiple rdeptask entries
Richard Purdie [Wed, 27 Jun 2012 21:01:29 +0000 (21:01 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Revert the regexp removal for the type field and instead anchor regexp
Richard Purdie [Thu, 28 Jun 2012 11:34:20 +0000 (11:34 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotest/fetch: Switch the comparision order to make test failures slightly clearer
Richard Purdie [Thu, 28 Jun 2012 11:33:05 +0000 (11:33 +0000)]
test/fetch: Switch the comparision order to make test failures slightly clearer

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotest/fetch: Ensure cwd is valud for the git clone
Richard Purdie [Thu, 28 Jun 2012 11:32:37 +0000 (11:32 +0000)]
test/fetch: Ensure cwd is valud for the git clone

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue: Reimplement recrdepends so it works more correctly
Richard Purdie [Tue, 26 Jun 2012 18:00:58 +0000 (18:00 +0000)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agorunqueue.py: Convert depends variable to use sets
Richard Purdie [Wed, 27 Jun 2012 10:04:48 +0000 (11:04 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotaskdata: Add gettask_id_fromfnid helper function
Richard Purdie [Wed, 27 Jun 2012 10:04:06 +0000 (11:04 +0100)]
taskdata: Add gettask_id_fromfnid helper function

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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoFix for Hob bug #2323
Cristian Iorga [Fri, 22 Jun 2012 16:08:24 +0000 (19:08 +0300)]
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.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohig.py: use module tempfile to create temp file
Kang Kai [Mon, 25 Jun 2012 08:47:36 +0000 (16:47 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Ensure star character doesn't end up in mirror tarball names
Richard Purdie [Fri, 22 Jun 2012 11:53:56 +0000 (12:53 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/bb/utils.py: remove unnecessary preserved variables
Paul Eggleton [Thu, 21 Jun 2012 14:43:02 +0000 (15:43 +0100)]
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>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Add new mirror syntax to simplify mirror specifications
Richard Purdie [Thu, 21 Jun 2012 14:34:57 +0000 (15:34 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Handle errors orruring when building mirror urls
Richard Purdie [Fri, 22 Jun 2012 11:54:42 +0000 (12:54 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoprocess: Improve _logged_communicate buffering
Richard Purdie [Fri, 22 Jun 2012 11:55:55 +0000 (12:55 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotaskdata.py: Add support for rdepends task flag
Richard Purdie [Fri, 22 Jun 2012 11:51:29 +0000 (12:51 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoutils.py: Add function to set nonblocking operation on a file descriptor
Richard Purdie [Fri, 22 Jun 2012 11:53:16 +0000 (12:53 +0100)]
utils.py: Add function to set nonblocking operation on a file descriptor

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agogit.py: Remove -l option, its not necessary
Richard Purdie [Fri, 22 Jun 2012 11:52:30 +0000 (12:52 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/bb/siggen.py: log when tainting the signature of a task
Paul Eggleton [Thu, 21 Jun 2012 17:28:47 +0000 (18:28 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: tweak help text for -C slightly
Paul Eggleton [Thu, 21 Jun 2012 17:28:46 +0000 (18:28 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/git.py: Optimize clone fall back when it is local
Jason Wessel [Thu, 14 Jun 2012 21:44:02 +0000 (16:44 -0500)]
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.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/depexp.py: use the new progressbar in Hob
Kang Kai [Tue, 19 Jun 2012 09:39:18 +0000 (17:39 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Update replace_uri to handle uri types explicitly
Richard Purdie [Wed, 20 Jun 2012 16:37:22 +0000 (16:37 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotest/fetch: Add a couple of extra test cases
Richard Purdie [Wed, 20 Jun 2012 15:10:20 +0000 (15:10 +0000)]
test/fetch: Add a couple of extra test cases

(From Poky rev: 01d8220ef8580ca980a14c05d500765ca2d37e2c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agotest/fetch: Add in unit tests for uri_replace() and git premirrors
Richard Purdie [Wed, 20 Jun 2012 13:02:08 +0000 (13:02 +0000)]
test/fetch: Add in unit tests for uri_replace() and git premirrors

(From Poky rev: 4be81b5cadb7813d37152411c23764501f5869d3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: uri_replace() only consider ud.localpath where its a file
Richard Purdie [Wed, 20 Jun 2012 12:59:31 +0000 (12:59 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: uri_replace() improve mirrortarball handling
Richard Purdie [Wed, 20 Jun 2012 12:58:04 +0000 (12:58 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: uri_replace() remove what amounts to a null operation and add some comments
Richard Purdie [Wed, 20 Jun 2012 12:57:15 +0000 (12:57 +0000)]
fetch2: uri_replace() remove what amounts to a null operation and add some comments

(From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Add parameter handling to uri_replace()
Richard Purdie [Wed, 20 Jun 2012 12:55:11 +0000 (12:55 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Remove basestring test and simplify uri_replace
Richard Purdie [Wed, 20 Jun 2012 12:54:46 +0000 (12:54 +0000)]
fetch2: Remove basestring test and simplify uri_replace

(From Poky rev: d5657883d34bfef6beec594ac8d799f617b6b3ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Simplify some looping constructs in uri_replace()
Richard Purdie [Wed, 20 Jun 2012 12:52:53 +0000 (12:52 +0000)]
fetch2: Simplify some looping constructs in uri_replace()

(From Poky rev: c6bd25150a842a530f958d7233b15ae50d42c6c8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Improve mirror looping to consider more cases
Richard Purdie [Wed, 20 Jun 2012 12:49:39 +0000 (12:49 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Explicitly check for mirror tarballs in mirror handling code
Richard Purdie [Wed, 20 Jun 2012 12:47:42 +0000 (12:47 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Split try_mirrors into two parts
Richard Purdie [Wed, 20 Jun 2012 12:46:32 +0000 (12:46 +0000)]
fetch2: Split try_mirrors into two parts

There are no functionality changes in this change

(From Poky rev: d222ebb7c75d74fde4fd04ea6feb27e10a862bae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Ensure when downloading we are consistently in the same directory
Richard Purdie [Wed, 20 Jun 2012 12:40:02 +0000 (12:40 +0000)]
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)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Only cache data if fn is set, its pointless caching it against a None value
Richard Purdie [Wed, 20 Jun 2012 12:38:53 +0000 (12:38 +0000)]
fetch2: Only cache data if fn is set, its pointless caching it against a None value

(From Poky rev: c2df30bf6d1f8c263a38c45866936c1bf496ece5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Fix error handling in uri_replace()
Richard Purdie [Wed, 20 Jun 2012 12:37:36 +0000 (12:37 +0000)]
fetch2: Fix error handling in uri_replace()

(From Poky rev: 1bfba28a583cb167f60e05ecdf34d0786dc1eec5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/__init__: Make it clearer when uri_replace doesn't return a match
Richard Purdie [Thu, 14 Jun 2012 13:40:28 +0000 (13:40 +0000)]
fetch2/__init__: Make it clearer when uri_replace doesn't return a match

(From Poky rev: dc9976331c5cbb0983adb54f6deb97b9203bacbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: add -C option to invalidate a task and rebuild the target
Paul Eggleton [Mon, 18 Jun 2012 15:45:36 +0000 (16:45 +0100)]
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: ensure -f causes dependent tasks to be re-run
Paul Eggleton [Mon, 18 Jun 2012 15:45:35 +0000 (16:45 +0100)]
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agomethodpool: Improve method already seen error message
Richard Purdie [Thu, 14 Jun 2012 13:19:45 +0000 (14:19 +0100)]
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2/local: Ensure quoting is handled correctly from the url
Richard Purdie [Thu, 14 Jun 2012 12:57:53 +0000 (13:57 +0100)]
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agofetch2: Fix missing output from stderr in fetcher logs
Jason Wessel [Thu, 14 Jun 2012 03:09:38 +0000 (22:09 -0500)]
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
--

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fixed issue about 'select a base image' combo not sensitive
Liming An [Thu, 14 Jun 2012 12:22:26 +0000 (20:22 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fixed an issue about no 'set_page' function in hob failed page show
Liming An [Thu, 14 Jun 2012 12:22:25 +0000 (20:22 +0800)]
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.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoimage-writer: tweak some strings
Kang Kai [Thu, 14 Jun 2012 10:10:58 +0000 (18:10 +0800)]
image-writer: tweak some strings

Tweak some strings in accord with the script name 'image writer', and
remove extra noun 'button'.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hig.py: simplify subprocess call
Kang Kai [Thu, 14 Jun 2012 10:10:57 +0000 (18:10 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hig.py: tweak strings
Kang Kai [Thu, 14 Jun 2012 10:10:56 +0000 (18:10 +0800)]
ui/crumbs/hig.py: tweak strings

Add comments for DeployImageDialog 'standalone' part of codes to make it
easy to read.
And tweak some strings.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohob2: create a standalone deploy image tool
Kang Kai [Wed, 6 Jun 2012 09:52:28 +0000 (17:52 +0800)]
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>
7 years agohob2: update DeployImageDialog for seperated tool
Kang Kai [Wed, 6 Jun 2012 09:52:27 +0000 (17:52 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hig.py: check deploy process return value
Kang Kai [Wed, 6 Jun 2012 09:52:26 +0000 (17:52 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hig.py: remove extra spaces
Kang Kai [Wed, 6 Jun 2012 09:52:25 +0000 (17:52 +0800)]
ui/crumbs/hig.py: remove extra spaces

Remove extra spaces at the end of line or blank line.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/hig.py: fix run time error
Kang Kai [Wed, 6 Jun 2012 09:52:24 +0000 (17:52 +0800)]
ui/crumbs/hig.py: fix run time error

Commit 094742bed2fc01d55f572da946fcfa7a48521401 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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoui/crumbs/utils.py: import module bb
Kang Kai [Wed, 6 Jun 2012 09:52:23 +0000 (17:52 +0800)]
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

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fixed the index issue when set actived item for base image combo
Liming An [Mon, 4 Jun 2012 10:52:14 +0000 (18:52 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: Change 'run image' work flow and image detail screen as ui design
Liming An [Mon, 4 Jun 2012 10:52:13 +0000 (18:52 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: Interpret some special characters for label markup
Shane Wang [Sat, 2 Jun 2012 04:54:38 +0000 (12:54 +0800)]
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]

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: add versions for compatibility check between Hob and templates
Shane Wang [Sat, 2 Jun 2012 04:54:37 +0000 (12:54 +0800)]
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]

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: lower the limitation for PyGTK
Shane Wang [Sat, 2 Jun 2012 04:54:36 +0000 (12:54 +0800)]
Hob: lower the limitation for PyGTK

Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fixed a definition not match issue when click choose directflb in package page
Liming An [Fri, 1 Jun 2012 10:40:59 +0000 (18:40 +0800)]
Hob: fixed a definition not match issue when click choose directflb in package page

[YOCTO #2526]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: fix entry of recipe page can't be edited in case after clicked clear button
Liming An [Fri, 1 Jun 2012 10:40:58 +0000 (18:40 +0800)]
Hob: fix entry of recipe page can't be edited in case after clicked clear button

cancel some inviable code and fixed this issue

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: clear the repeated function get_kernel_file_name
Liming An [Fri, 1 Jun 2012 10:40:57 +0000 (18:40 +0800)]
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.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake: include varflags in checksums
Paul Eggleton [Wed, 30 May 2012 16:17:18 +0000 (17:17 +0100)]
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/bb/fetch2: ignore remote URIs when doing file checksums
Paul Eggleton [Wed, 30 May 2012 16:17:17 +0000 (17:17 +0100)]
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]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: report recipe being parsed when ExpansionError occurs
Paul Eggleton [Wed, 30 May 2012 16:17:16 +0000 (17:17 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker: fix UnboundLocalError when exception occurs during parsing
Paul Eggleton [Wed, 30 May 2012 16:17:15 +0000 (17:17 +0100)]
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

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/bb/data_smart.py: don't report variable in ExpansionError if not set
Paul Eggleton [Wed, 30 May 2012 16:17:14 +0000 (17:17 +0100)]
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...".

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohob: handle sanity check failures as a separate event
Paul Eggleton [Mon, 28 May 2012 17:10:39 +0000 (18:10 +0100)]
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: add the 'build new' be as the primary action for 'Image detail' page
Liming An [Wed, 30 May 2012 12:01:11 +0000 (20:01 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob: Fixed a compatible issue for indicator icon view
Liming An [Wed, 30 May 2012 12:01:10 +0000 (20:01 +0800)]
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.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHOB: 'str' object has no attribute 'close'
Robert Yang [Wed, 30 May 2012 10:19:08 +0000 (18:19 +0800)]
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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agohob2: set beginning folders for FileChooserDialog
Kang Kai [Wed, 30 May 2012 08:13:47 +0000 (16:13 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agocooker.py: terminate the Parser processes
Kang Kai [Wed, 23 May 2012 09:40:19 +0000 (17:40 +0800)]
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.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agolib/bb/fetch2: fix comments for verify_checksum
Paul Eggleton [Thu, 24 May 2012 15:47:55 +0000 (16:47 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/exceptions: Handle reports from the field of exception code failures
Richard Purdie [Thu, 24 May 2012 13:23:44 +0000 (14:23 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/utils.py: Ensure utils.which() returns full paths
Richard Purdie [Thu, 24 May 2012 12:57:16 +0000 (13:57 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agobitbake/cooker: Ensure matchFile returns full pathnames
Richard Purdie [Thu, 24 May 2012 12:56:34 +0000 (13:56 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7 years agoHob:fixed the issue of primary button is not an 'orange hob button'
Liming An [Thu, 24 May 2012 11:07:10 +0000 (19:07 +0800)]
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]

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>