]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
12 years agofetch2: Add editor modelines for bb.tests.*
Olof Johansson [Tue, 29 Jan 2013 07:50:10 +0000 (08:50 +0100)] 
fetch2: Add editor modelines for bb.tests.*

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Adapt encode/decode url to use URI class
Olof Johansson [Tue, 29 Jan 2013 07:50:09 +0000 (08:50 +0100)] 
fetch2: Adapt encode/decode url to use URI class

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: unittests for bb.fetch2.URI class
Olof Johansson [Tue, 29 Jan 2013 07:50:08 +0000 (08:50 +0100)] 
fetch2: unittests for bb.fetch2.URI class

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Add a class representing a generic URI
Olof Johansson [Tue, 29 Jan 2013 07:50:07 +0000 (08:50 +0100)] 
fetch2: Add a class representing a generic URI

A class representing a generic URI, with methods for accessing the URI
components, and stringifies to the URI. This class should be a bit more
flexible than the existing {encode,decode}_url functions in that it
supports more components (e.g. port) and that it does not rely on a
specific order on the return values. This makes it easy to add new
properties without affecting the API.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Remove unused code in wget fetcher
Olof Johansson [Tue, 29 Jan 2013 07:50:06 +0000 (08:50 +0100)] 
fetch2: Remove unused code in wget fetcher

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Ensure directory for stampfile exists before trying to create it
Richard Purdie [Fri, 15 Feb 2013 16:17:30 +0000 (16:17 +0000)] 
fetch2: Ensure directory for stampfile exists before trying to create it

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils: Use rm -rf in remove()
Richard Purdie [Sun, 3 Feb 2013 16:51:34 +0000 (16:51 +0000)] 
utils: Use rm -rf in remove()

Whilst shutils.rmtree() is pythonic, its also slow. Its faster to
use rm -rf which makes optimial use of the right syscalls.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove save/load template functionality
Cristiana Voicu [Thu, 31 Jan 2013 12:43:08 +0000 (14:43 +0200)] 
hob: remove save/load template functionality

The Hob templates functionality, in its current incarnation,
is confusing and has no clear utility.

[YOCTO #3696]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty.py: fix unknown event bb.event.DiskFull
Robert Yang [Fri, 1 Feb 2013 08:56:45 +0000 (16:56 +0800)] 
knotty.py: fix unknown event bb.event.DiskFull

There is an error:

ERROR: No new tasks can be excuted since the disk space monitor action
is "STOPTASKS"!
ERROR: Unknown event: <bb.event.DiskFull object at 0x2ab6310>

This is because we don't handle the event bb.event.DiskFull in
knotty.py, we don't want the knotty to do anything here since we have
done everything in monitordisk.py, so just ignore this event would fix
the problem.

[YOCTO #3523]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-layers: make show-cross-depends avoid long path
Robert Yang [Wed, 6 Feb 2013 09:28:16 +0000 (17:28 +0800)] 
bitbake-layers: make show-cross-depends avoid long path

The "bitbake-layers show-cross-depends" print the absolute path in the
past, now it will print the relative path (relative to the layer dir) by
default, and add the "-f" option to make it print the absolute path.

For example:

$ bitbake-layers show-cross-depends
[snip]
meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires meta/conf/machine/include/ia32-base.inc
[snip]

$ bitbake-layers show-cross-depends -f
[snip]
/path/to/poky/meta-intel/meta-jasperforest/conf/machine/jasperforest.conf requires /path/to/poky/meta/conf/machine/include/ia32-base.inc
[snip]

[YOCTO #3824]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: remove parsing warnings when machine is changed
Cristiana Voicu [Mon, 4 Feb 2013 14:56:00 +0000 (16:56 +0200)] 
hob: remove parsing warnings when machine is changed

When the machine is changed, the warnings list is emptied and the warnings
bar is hidden.

[YOCTO #3830]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: no sanity checks re-run
Cristiana Voicu [Tue, 5 Feb 2013 14:52:02 +0000 (16:52 +0200)] 
hob: no sanity checks re-run

Hob was hanging when the user tried a rebuild a new image, because
of sanity checks. It should not re-run sanity checks.

[YOCTO #3829]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agomonitordisk.py: disable the inode checking for some fs
Robert Yang [Mon, 4 Feb 2013 10:03:35 +0000 (18:03 +0800)] 
monitordisk.py: disable the inode checking for some fs

There is an error when use disk monitor on btrfs:
WARNING: The free inode of rootfs is running low (0.000K left)
ERROR: Immediately abort since the disk space monitor action is "ABORT"!

This is beucase some fs formats' statvfs.f_files (inodes) is zero, thus
the statvfs.f_favail (free inodes) is zero, too, this a feature of the
fs, we disable the inode checking for such a fs.

[YOCTO #3609]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Improve lock/done stamp file paths for local files
Richard Purdie [Thu, 14 Feb 2013 21:38:17 +0000 (21:38 +0000)] 
fetch2: Improve lock/done stamp file paths for local files

Currently stamps end up at the top level of DL_DIR even if the files
themselves are in a directory structure. This patch preserves path
components allowing the top level directory to be less populated
which is an advantage for large sstate caches.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake & hob: reparse config files, when sanity check updates bblayers.conf
Cristiana Voicu [Tue, 12 Feb 2013 13:27:22 +0000 (15:27 +0200)] 
bitbake & hob: reparse config files, when sanity check updates bblayers.conf

I've sent a patch to poky, with some changes in sanity.bbclass. When bblayers.conf
is updated, it updates also a variable to know when to reparse configuration files.
This patch contains the changes to reparse conf files, after a sanity check which
changes bblayers.conf.

[YOCTO #3213]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Ensure expansions happen in URL parameters in uri_replace
Richard Purdie [Thu, 14 Feb 2013 21:36:30 +0000 (21:36 +0000)] 
fetch2: Ensure expansions happen in URL parameters in uri_replace

For example, this allows us to specify downloadfilename=PATH in sstate
mirror urls to improve directory structures in DL_DIR when using sstate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoConfHandler: Use re.X to make long regexp more readable
Olof Johansson [Thu, 14 Feb 2013 11:28:32 +0000 (12:28 +0100)] 
ConfHandler: Use re.X to make long regexp more readable

The __config_regexp__ in ConfHandler is quite long, and using re.X to
break the expression onto several lines make it a bit easier to read.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotests/codeparser: Hack around circular inclusion problem
Richard Purdie [Thu, 14 Feb 2013 21:35:25 +0000 (21:35 +0000)] 
tests/codeparser: Hack around circular inclusion problem

There is a circular dependency issue where bb.data can't directly depend on
bb.parse. The tests were failing due to this issue which is misleading. This
patch hacks around it for now. I'd rather that than not running tests at all.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agowget: Only use -O option when not spidering
Richard Purdie [Thu, 14 Feb 2013 21:33:04 +0000 (21:33 +0000)] 
wget: Only use -O option when not spidering

If we pass the -O option whilst spidering, empty files are created which is not
desired. We also need to ensure any subdirectories are created when using the
downloadfilename parameter.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocodeparser: Track bb.utils.contains usage
Richard Purdie [Thu, 14 Feb 2013 21:59:21 +0000 (21:59 +0000)] 
codeparser: Track bb.utils.contains usage

The bb.utils.contains function usage is getting increasingly used in the metadata
but isn't handled automatically by the python dependency tracking code. This patch
changes that and also adds the "OE" names for the functions.

Whilst there are reasons this is a bad idea, its likely outweighed by the
shear number of these references and the current holes in dependency information
which we're now relying heavily upon.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocodeparser: Track appendVar and prependVar calls as we do for getVar
Richard Purdie [Thu, 14 Feb 2013 21:57:36 +0000 (21:57 +0000)] 
codeparser: Track appendVar and prependVar calls as we do for getVar

We need to track appendVar and prependVar calls just as we do for getVar in order
to ensure we're not missing variable dependencies.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRemove whitelisted vars from non-task deps
Christopher Larson [Tue, 3 Apr 2012 23:23:49 +0000 (18:23 -0500)] 
Remove whitelisted vars from non-task deps

Though the value of variables in the BB_BASEHASH_WHITELIST is kept out of the
checksums, dependency on them is not, at least for variables and non-task
functions. In the code, the whitelist is removed from the overall task dep
list, but not the individual variable deps. The result of this is that
functions like sysroot_stage_all and oe_runmake end up with whitelisted
variables like TERM listed in their dependencies, which means that doing
a 'unset TERM' before building will result in all checksums for tasks that
depend on those changing, and shared state reuse not behaving correctly.

This is only really a potential issue for variables from the environment, as
it's the existance/removal of the variable that's an issue, not its value, and
the other whitelisted variables are set in our metadata. This which means in
practical terms the only cases where this is likely to be an issue are in
environments where one of the following are unset: TERM, LOGNAME, HOME, USER,
PWD, SHELL. This may seem like an unlikely circumstance, but is in fact a real
issue for those of us using autobuilders. Jenkins does not set TERM when
executing shell, which means shared state archives produced by your jenkins
server would not be fully reused by an actual user.

Fixed by removing the whitelisted elements from the individual variable deps,
not just the accumulated result.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoConfHandler: Improve regexp to fix mis-parsing of += and no whitespace
Richard Purdie [Thu, 14 Feb 2013 10:31:12 +0000 (10:31 +0000)] 
ConfHandler: Improve regexp to fix mis-parsing of += and no whitespace

If you have:

FOO = "a"
FOO += "b"
FOO+= "c"

The expected result is "a b c" however we were seeing "a b" with the FOO+
variable being assigned the value "c". This isn't the expected result.

We need to make the name part of the variale non-greedy so that any + character
becomes part of the operator. This patch does that. I compared the configuration
in OE-Core before and after the change and only the test case changed.

[YOCTO #3834]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/utils: Improve environment handling to allow UIs access to original environment
Richard Purdie [Mon, 11 Feb 2013 11:00:45 +0000 (11:00 +0000)] 
bitbake/utils: Improve environment handling to allow UIs access to original environment

We need to empty out the environment whilst we build the cooker but
we need the environment for the UIs since hob uses DISPLAY and other
session variables.

This patch adapts the utils functions to return removed environment
components so we can reinject them for use by the UI, allowing hob
to work again.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv/serv.py: Fix logging in daemon mode
Richard Purdie [Wed, 6 Feb 2013 23:18:19 +0000 (23:18 +0000)] 
prserv/serv.py: Fix logging in daemon mode

In deamon mode we need to ensure the logging module is sending log data to the
log file. These changes ensure this happens correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Always use separate process for PR Service
Richard Purdie [Wed, 6 Feb 2013 15:59:07 +0000 (15:59 +0000)] 
bitbake: Always use separate process for PR Service

Using the threading module interacts badly with multiprocessing used elsewhere
in bitbake under certain machine loads. This was leading to bitbake hanging on
Ctrl+C when the PR Server was being used.

This patch converts it to always use the daemonize code which
then means the threading code isn't required.

[YOCTO #3742]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoUpdate version to 1.17.0
Richard Purdie [Wed, 6 Feb 2013 13:07:35 +0000 (13:07 +0000)] 
Update version to 1.17.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Remove broken git variables from the environment
Darren Hart [Tue, 5 Feb 2013 22:52:45 +0000 (14:52 -0800)] 
fetch2: Remove broken git variables from the environment

The following variables perform no function outside of bitbake:

    GIT_CONFIG
    GIT_PROXY_HOST
    GIT_PROXY_PORT
    GIT_PROXY_IGNORE

GIT_CONFIG only affects the git-config command which is not relevant to
the fetcher. This was previously used with the OE GIT_CORE_CONFIG
variable which would provide a basic git config to use instead of the
user's config. This usage was deprecated by git for over a year now:

http://git.661346.n2.nabble.com/Overriding-gitconfig-using-GIT-CONFIG-td6680977.html

GIT_PROXY_HOST and GIT_PROXY_PORT are not used by git.

GIT_PROXY_IGNORE was an OE construct used to create the custom git
config and had no meaning outside of the OE environment. It is not used
by git.

Remove these variables from the fetcher environment.

Users wishing to configure git to work with a proxy should define the
GIT_PROXY_COMMAND environment variable to use an external script.
NO_PROXY can be used within this script to skip the proxy for certain
hosts.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Export upper and lower case environment variables
Darren Hart [Tue, 5 Feb 2013 22:52:44 +0000 (14:52 -0800)] 
fetch2: Export upper and lower case environment variables

Applications are inconsistent in their use of upper and lower case proxy
variables. Curl, for example, specifies NO_PROXY (not no_proxy) in the
man page (changed in 2009 [1]). Avoid proxy issues by ensuring both the
upper and lower case versions of each proxy variable is available in the
environment for the fetcher commands.

Add FTPS_PROXY and ftps_proxy to the list as well.

1. http://curl.haxx.se/mail/tracker-2009-04/0012.html

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker/utils: Drop custom 'interactive' variables list and store environment in BB_OR...
Richard Purdie [Tue, 5 Feb 2013 16:02:03 +0000 (16:02 +0000)] 
cooker/utils: Drop custom 'interactive' variables list and store environment in BB_ORIGENV instead

Maintining hardcoded lists of user environmental variables is hacky,
replace these with the savedenv datastore. Allow access to that
through the BB_ORIGENV variable.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocompat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues
Richard Purdie [Wed, 6 Feb 2013 00:28:08 +0000 (00:28 +0000)] 
compat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues

python 2.7 shows hangs with issues in its pool implmenetation. Rather than
try and hack around these, add a copy of the working pool implementation
to the compat module from 2.7.3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: fetch2: Print the complete SRCREV variable name when INVALID
Darren Hart [Tue, 5 Feb 2013 10:31:37 +0000 (02:31 -0800)] 
bitbake: fetch2: Print the complete SRCREV variable name when INVALID

If a particular SRCREV (say for a particular branch) is missing, the
fetcher will currently just report an obtuse error about the "SRCREV"
being invalid. If there is more information is to be had (say from name,
i.e. branch, and pn) then display that as well.

The new error looks something like this:

ERROR: ExpansionError during parsing /home/dvhart/source/poky/meta/recipes-kernel/linux/linux-yocto_3.4.bb: Failure expanding variable do_patch: ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://otcgit.jf.intel.com/dvhart/linux-yocto-minnow-3.4.git;protocol=git;nocheckout=1;branch=standard/minnow,meta,emgd-1.14;name=machine,meta,emgd'. Please set SRCREV_emgd_pn-linux-yocto to a valid value

Note the variable listed as invalid is
"SRCREV_emgd_pn-linux-yocto", making it explicit what is wrong.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: bitbake-devel@lists.openembedded.org
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agosetup.py: Set the 'url' in setup.py to the OE BitBake page.
Bill Traynor [Thu, 31 Jan 2013 17:01:32 +0000 (12:01 -0500)] 
setup.py: Set the 'url' in setup.py to the OE BitBake page.

Removed the old berlios BitBake project page and inserted
the BitBake page from the OE project:
http://www.openembedded.org/wiki/BitBake

Signed-off-by: Bill Traynor <wmat@alphatroop.com>
12 years agobitbake-layers: print the recipe's depends that crosses a layer boundary
Robert Yang [Fri, 25 Jan 2013 08:35:10 +0000 (16:35 +0800)] 
bitbake-layers: print the recipe's depends that crosses a layer boundary

Figure out the dependency between recipes that crosses a layer boundary

* Introduction:
  - For the .bb file, we need check the following depends:
    > Check the DEPENDS, RDEPENDS and inherits according to the
      cooker_data.
    > The cooker_data doesn't have the info about "require/include xxx",
      so we need check them manually.

  - For the .bbclass, .inc and .conf file, we can't get their file
    depends from the cooker_data, we need check them manually.

* Usage:
  $ bitbake-layer show-cross-depends

  I don't like the name "show-cross-depends", figure-out-cross-depends
  might be better, but most of the commands are "show-xxx" for bitbake-layers.

* Output: (snipped)
/work/poky/meta/recipes-support/libusb/libusb-compat_0.1.4.bb inherits /work/poky/meta-yocto/classes/poky-sanity.bbclass
/work/poky/meta-intel/meta-cedartrail/recipes-cdv-media/images/core-image-cdv-media.bb requires /work/poky/meta/recipes-sato/images/core-image-sato.bb
/work/poky/meta-yocto/recipes-core/tiny-init/tiny-init.bb RDEPENDS /work/poky/meta/recipes-core/busybox/busybox_1.20.2.bb
/work/poky/meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb DEPENDS /work/poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
/work/poky/meta/classes/distrodata.bbclass includes /work/poky/meta-yocto/conf/distro/include/package_regex.inc
/work/poky/meta-intel/meta-sys940x/conf/machine/sys940x.conf requires /work/poky/meta/conf/machine/include/tune-atom.inc

[YOCTO #3387]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh.py: add example SRC_URI
Martin Jansa [Mon, 28 Jan 2013 15:56:42 +0000 (16:56 +0100)] 
ssh.py: add example SRC_URI

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh.py: throw ParameterError when someone tries ssh://foo; protocol=git
Martin Jansa [Mon, 28 Jan 2013 15:56:41 +0000 (16:56 +0100)] 
ssh.py: throw ParameterError when someone tries ssh://foo; protocol=git

* taken from SFTP fetcher:
  http://patchwork.openembedded.org/patch/43027/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agossh: fix fetcher
Martin Jansa [Mon, 28 Jan 2013 15:56:40 +0000 (16:56 +0100)] 
ssh: fix fetcher

* set localpath in urldata_init
  otherwise localpath and basename were None, when fetcher was trying to
  define .lock and .done paths
  basepath = d.expand("${DL_DIR}/%s" % os.path.basename(self.localpath or self.basename))
* remove "host" from localpath
  .done and .lock files are always using just basename, so if someone
  has 2 recipes with:
  SRC_URI = "ssh://foo/file.txt"
  SRC_URI = "ssh://bar/file.txt"
  then there will be only one file.txt.done in downloads anyway (and
  only first file.txt from first server will be returned on do_fetch

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: eliminate the "by recipe" grouping in the packages table
Cristiana Voicu [Thu, 31 Jan 2013 11:50:16 +0000 (13:50 +0200)] 
hob: eliminate the "by recipe" grouping in the packages table

We have agreed to change how we show the packages. Now they are not grouped by
recipe. Until now, it was implemented using  TreeStore and I've changed it to
extend a ListStore. I have modified all the function in according to this.

[YOCTO #2180]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Use a GtkTreeView to present and configure the sstate mirrors
Cristiana Voicu [Mon, 28 Jan 2013 13:33:39 +0000 (15:33 +0200)] 
hob: Use a GtkTreeView to present and configure the sstate mirrors

After some discussions about the design of the Shared State Settings tab in Hob,
we have decided that using a GtkTreeView to present and configure the sstate
mirrors is probably the best solution.

[YOCTO #3569]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotinfoil: support other fds, enable color support
Christopher Larson [Sat, 26 Jan 2013 00:56:30 +0000 (17:56 -0700)] 
tinfoil: support other fds, enable color support

Rather than only handling sys.stdout, also support any arbitrary file object,
and enable color for the formatter if that file is a tty.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: small fixes to parsing warnings dialog
Cristiana Voicu [Fri, 25 Jan 2013 15:05:26 +0000 (17:05 +0200)] 
hob: small fixes to parsing warnings dialog

Set the labels selectable; reset the warnings list when another machine is selected;
changed a label name

[YOCTO #3215]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake & hob: implement functions to assure consistency for configuration files
Cristiana Voicu [Fri, 25 Jan 2013 14:10:12 +0000 (16:10 +0200)] 
bitbake & hob: implement functions to assure consistency for configuration files

Added a new command in bitbake to save a variable in a file; added a function
in cooker which is called by this command.

Added new command in bitbake to enable/disable data tracking.

The function saveConfigurationVar from cooker.py saves a variable in the file that
is received by argument. It checks all the operations made on that variable, using the history.
If it's the first time when it does some changes on a variable,it comments the lines where
an operation is made on it, and it sets it in a line to the end of file. If it's not
the first time(it has a comment before), it replaces the line.

Made some changes in hob to save the variables from bblayers.conf and local.conf
using the bitbake command.

[YOCTO #2934]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocache.py: Drop support for BROKEN variable
Richard Purdie [Mon, 28 Jan 2013 14:48:09 +0000 (14:48 +0000)] 
cache.py: Drop support for BROKEN variable

All it now does is function in a similar way to EXCLUDE_FROM_WORLD and
since we have a better named variable for this, lets just drop the
usage of BROKEN at the bitbake level.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: Dump out performance data of individual tasks
Richard Purdie [Fri, 10 Jun 2011 16:22:54 +0000 (16:22 +0000)] 
build.py: Dump out performance data of individual tasks

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils.py: Add function for processing profile output
Richard Purdie [Mon, 28 Jan 2013 14:40:04 +0000 (14:40 +0000)] 
utils.py: Add function for processing profile output

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-diffigs: Don't pull in tinfoil unless we really need/plan to use it
Richard Purdie [Fri, 25 Jan 2013 12:54:49 +0000 (12:54 +0000)] 
bitbake-diffigs: Don't pull in tinfoil unless we really need/plan to use it

This means we can run in parallel with other bitbake processed we're not in
task mode.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-layers: fix get_file_layer
Robert Yang [Fri, 25 Jan 2013 08:35:09 +0000 (16:35 +0800)] 
bitbake-layers: fix get_file_layer

The get_file_layer can't handle the nested layer correctly, e.g.:

meta-intel/conf/layer.conf
meta-intel/meta-cedartrail/conf/layer.conf

They are two layers, the file:
meta-intel/common/recipes-bsp/amt/lms_7.1.20.bb
belongs to meta-intel's layer, but the get_file_layer() may return
meta-cedartrail accordig to BBLAYERS' order, since it uses:

for layerdir in self.bblayers:
    if regex.match(os.path.join(layerdir, 'test')):
        return self.get_layer_name(layerdir)

which doesn't care the filename, re-match the filename would fix the
problem.

[YOCTO #3387]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocache.py: remove the duplicated self.file_depends
Robert Yang [Fri, 25 Jan 2013 08:34:13 +0000 (16:34 +0800)] 
cache.py: remove the duplicated self.file_depends

There are two "self.file_depends =" lines in cache.py::CoreRecipeInfo:

class CoreRecipeInfo(RecipeInfoCommon):
    __slots__ = ()

    cachefile = "bb_cache.dat"

    def __init__(self, filename, metadata):
        self.file_depends = metadata.getVar('__depends', False)
    [snip]
        self.file_depends = metadata.getVar('__depends', False)

They are duplicated, remove the last one.

[YOCTO #3795]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: hob do not use .hob dir for variables from local.conf and bblayers.conf
Cristiana Voicu [Wed, 23 Jan 2013 12:13:44 +0000 (14:13 +0200)] 
hob: hob do not use .hob dir for variables from local.conf and bblayers.conf

If .hob exists, hob takes the variable from there. Change to not override anymore
the variables which comes from bblayers.conf and local.conf

[YOCTO #2934]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoprserv: use only PRSERV_HOST
Constantin Musca [Wed, 23 Jan 2013 14:54:03 +0000 (16:54 +0200)] 
prserv: use only PRSERV_HOST

- remove PRSERV_PORT variable
- use 'hostname:port' as PRSERV_HOST format
- use 'localhost:0' for enabling the local PRServer

[YOCTO #3744]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocrumbs: Add file lost from previous commit
Richard Purdie [Tue, 22 Jan 2013 15:37:56 +0000 (15:37 +0000)] 
crumbs: Add file lost from previous commit

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: combo box updated correctly
Cristiana Voicu [Tue, 15 Jan 2013 14:50:39 +0000 (16:50 +0200)] 
hob: combo box updated correctly

The 'select a base image' option is no longer displayed once
an image is selected

[YOCTO #3671]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agopersist_data: add get_by_pattern method to API
Constantin Musca [Tue, 22 Jan 2013 09:37:57 +0000 (11:37 +0200)] 
persist_data: add get_by_pattern method to API

- one can use get_by_pattern to get a list of values associated
with keys that match the specified pattern

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoparse_py: add ~ to config_regexp
Constantin Musca [Tue, 22 Jan 2013 09:37:27 +0000 (11:37 +0200)] 
parse_py: add ~ to config_regexp

- enable the '~' character in bitbake variables

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Hob should display warnings generated during parsing
Cristiana Voicu [Mon, 21 Jan 2013 14:40:07 +0000 (16:40 +0200)] 
hob: Hob should display warnings generated during parsing

-now Hob catches the warnings generated during parsing, and after the parsing
is completed, if there are any warnings, it shows a bar that contains a message
with how many warnings has encountered, and a button "View warnings"
-when "View warnings" button is clicked, Hob shows a dialog with the warnings;
if there more than 1 warning, you can use "Previous" and "Next" button to see them

[YOCTO #3215]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: progress bar changed to busy cursor when you open log file
Cristiana Voicu [Mon, 21 Jan 2013 14:50:40 +0000 (16:50 +0200)] 
hob: progress bar changed to busy cursor when you open log file

-the first implementation for this bug used a progress bar, that is shown
during open file process; it revelead that the progress bar stops earlier
-now I have implemented using gtk.show_uri() method, that shows itself a
busy cursor when it opens a file;
-deleted the code for the first implementation

[YOCTO #2997]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoBBHandler/ConfHandler: Merge fix for multiline comments
Richard Purdie [Mon, 21 Jan 2013 11:00:52 +0000 (11:00 +0000)] 
BBHandler/ConfHandler: Merge fix for multiline comments

This was meant to be squashed into the previous commit for multiline comment
handling. It fixes the case the commented multiline is followed by an empty
line which was resulting in a traceback instead of a sane error message.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: BBHandler/ConfHandler: Improve multiline comment handling
Richard Purdie [Fri, 14 Dec 2012 13:53:32 +0000 (13:53 +0000)] 
bitbake: BBHandler/ConfHandler: Improve multiline comment handling

Faced with an expression like:

 # Some comment \
 FOO = "bar"

what should bitbake do? Technically, the \ character means its multiline and
currently the code treats this as a continuation of the comment. This can
surprise some people and is not intuitive.

This patch makes bitbake simply error and asks the user to be clearer
about what they mean.

(Bitbake rev: 589d31ce41e019ee6a7cb6527d67bc76c0b6382a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Fix GTK+ and PyGtk version check error message to be more clear
Jessica Zhang [Thu, 3 Jan 2013 23:32:05 +0000 (15:32 -0800)] 
hob: Fix GTK+ and PyGtk version check error message to be more clear

Improve the error message the user sees if the versions are incorrect.

[YOCTO #3637]

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohg.py: Fixed fetch failure that occurs when SRCREV is a tag.
Jon Szymaniak [Mon, 17 Dec 2012 14:22:51 +0000 (09:22 -0500)] 
hg.py: Fixed fetch failure that occurs when SRCREV is a tag.

Removed "-r REV" from hg clone invocation to fetch the entire repo,
rather than just the subset at the specified revision. This will ensure
that the specified tag exists for successive commands (e.g., the update
built on line 149.)

Signed-off-by: Jon Szymaniak <jon.szymaniak@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Sort file checksums by value, not path
Tyler Hall [Wed, 19 Dec 2012 23:26:50 +0000 (18:26 -0500)] 
fetch2: Sort file checksums by value, not path

Changing the path to a file could change the task hash even if the file
still has the same checksum. This occurs when the task depends on
multiple files and the sort order of their paths changes. Usually the
sorting is consistent because layers tend to have the same relative
paths, but this should take care of other configuations.

The problem arose when using a .bbappend to add files to a recipe in
another layer. If the layer is located alongside the other layers and
their parent directory is moved, the hash does not change. However,
moving the .bbappend layer outside of the common directory can change
the path sort order and the task hash.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobase.bbclass: Fix bitbake example class usage
Richard Purdie [Fri, 18 Jan 2013 12:39:28 +0000 (12:39 +0000)] 
base.bbclass: Fix bitbake example class usage

Patch from Andrew Stubbs <ams@codesourcery.com> to fix listtasks and showdata
functions to output data correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: data_smart.py and friends: Track variable history
Peter Seebach [Fri, 18 Jan 2013 11:47:34 +0000 (11:47 +0000)] 
bitbake: data_smart.py and friends: Track variable history

This patch adds tracking of the history of variable assignments.
The changes are predominantly localized to data_smart.py and
parse/ast.py. cooker.py and data.py are altered to display the
recorded data, and turn tracking on for the bitbake -e case.
The data.py update_data() function warns DataSmart.finalize()
to report the caller one further back up the tree.

In general, d.setVar() does what it used to do. Optionally,
arguments describing an operation may be appended; if none
are present, the operation is implicitly ignored. If it's
not ignored, it will attempt to infer missing information
(name of variable, value assigned, file and line) by examining
the traceback. This slightly elaborate process eliminates a
category of problems in which the 'var' member of the keyword
arguments dict is set, and a positional argument corresponding
to 'var' is also set. It also makes calling much simpler for
the common cases.

The resulting output gives you a pretty good picture of what
values got set, and how they got set.

RP Modifications:

a) Split from IncludeHistory to separate VariableHistory
b) Add dedicated copy function instead of deepcopy
c) Use COW for variables dict
d) Remove 'value' loginfo value and just use 'details'
e) Desensitise code for calling order (set 'op' before/after
   infer_caller_details was error prone)
f) Fix bug where ?= "" wasn't shown correctly
g) Log more set operations as some variables mysteriously acquired
   values previously
h) Standardise infer_caller_details to be triggered from .record()
   where at all possible to reduce overhead in non-enabled cases
i) Rename variable parameter names to match inference code
j) Add VariableHistory emit() function to match IncludeHistory
k) Fix handling of appendVar, prependVar and matching flag ops
l) Use ignored=True to stop logging further events where appropriate

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: data_smart.py and friends: Track file inclusions for bitbake -e
Peter Seebach [Fri, 18 Jan 2013 11:45:22 +0000 (11:45 +0000)] 
bitbake: data_smart.py and friends: Track file inclusions for bitbake -e

This code adds inclusion history to bitbake -e output, showing
which files were included, in what order. This doesn't completely
resolve timing questions, because it doesn't show you which lines
of a file were processed before or after a given include, but it
does let you figure out what the path was by which a particular
file ended up in your build at all.

How it works: data_smart acquires a .history member, which is an
IncludeHistory; this represents the inclusion of a file and all its
inclusions, recursively. It provides methods for including files,
for finishing inclusion (done as an __exit__), and for
dumping the whole tree.

The parser is modified to run includes inside a with() to push
and pop the include filename.

RP Modifications:

a) Split Include and Variable tracking
b) Replace deepcopy usage with dedicated copy function
c) Simplify some variable and usage

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoBBHandler/data: Standardise some setVar access formats
Richard Purdie [Fri, 18 Jan 2013 11:46:30 +0000 (11:46 +0000)] 
BBHandler/data: Standardise some setVar access formats

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohig.py: refactor into individual components
Bogdan Marinescu [Thu, 10 Jan 2013 11:08:02 +0000 (13:08 +0200)] 
hig.py: refactor into individual components

Since hig.py was becoming too large (which impacted maintenance and
operations like git merges) it was split into individual files for
the classes that were implemented in hig.py. hig is now a Python
package (lib/bb/ui/crumbs/hig/). The patch was tested by
building core-image-basic/qemux86 in Hob and accessing the various
UI elements implemented in hig. Note that the patch does not change
the functionality of Hob in any way, it's just a code refactoring
that should make life a bit easier for Hob developers.

[YOCTO #3200]

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: Fix traceback when there are no dependencies
Richard Purdie [Mon, 7 Jan 2013 17:35:39 +0000 (17:35 +0000)] 
build.py: Fix traceback when there are no dependencies

A recipe with no dependencies results in a traceback (e.g. all in
ASSUME_PROVIDED). This shouldn't happen and this patch fixes it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: remove localcount and use AUTOINC instead
Constantin Musca [Wed, 5 Dec 2012 08:58:26 +0000 (10:58 +0200)] 
fetch2: remove localcount and use AUTOINC instead

- do not use the BB_URI_LOCALCOUNT database for computing revision
incremental numbers anymore
- sortable_revision now generates "AUTOINC+${latest_rev}"
- use one incrementing value rather than several
- PV becomes 0.1+gitAUTOINC+deadbeefdecafbad_decafbaddeadbeef
- remove all localcount code and simplify the fetcher
- this patch addresses the following proposal:
http://lists.linuxtogo.org/pipermail/bitbake-devel/2012-November/003878.html

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Ensure emit_func honours vardeps flag
Richard Purdie [Fri, 14 Dec 2012 16:25:52 +0000 (16:25 +0000)] 
data: Ensure emit_func honours vardeps flag

Currently, calling a shell function using exec_func may result in
dependent functions being missing, if the shell parser can't detect
the dependency, even if it was specified with the vardeps flag.

This patch ensures the function looks at the flag and considers it
when deciding which other functions need to be output.

[YOCTO #3561]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: use base image only if it was set
Cristiana Voicu [Fri, 14 Dec 2012 15:35:47 +0000 (17:35 +0200)] 
hob: use base image only if it was set

As it is, when you create a new image from scratch, hob gives an error.
This is because of the patch for #2601.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/bitbake: custom image is now using the base image
Cristiana Voicu [Wed, 12 Dec 2012 11:51:51 +0000 (13:51 +0200)] 
hob/bitbake: custom image is now using the base image

Till now, a custom image made in Hob was using only the packages from
the base image. Now it is using everything declared in the base image.
Also next to hob-image.bb, it creates another .bb file which is used
in building process. Those images are ignored by git.

[YOCTO #2601]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty: use bb.error instead of print
Mihai Lindner [Thu, 13 Dec 2012 10:55:25 +0000 (12:55 +0200)] 
knotty: use bb.error instead of print

Change to use bb.error instead of print, or maybe that was desired (?)
Also remove a tab, while in the neighborhood.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agogit.py: A bit of tidying up regarding grammar and supported protocols.
Robert P. J. Day [Thu, 13 Dec 2012 16:06:29 +0000 (11:06 -0500)] 
git.py: A bit of tidying up regarding grammar and supported protocols.

Doc cleanup, no functional change.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake.vim: detect *.bbappend files in ftdetect automatically
Eren Türkay [Wed, 12 Dec 2012 20:35:50 +0000 (22:35 +0200)] 
bitbake.vim: detect *.bbappend files in ftdetect automatically

Currently, *.bb and *.bbclass files are automatically highlighted and
detected as a bitbake file. Since *.bbappend files are also bitbake
files, vim plugin should automatically detect and highlight it as well.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart/BBHandler: Fix SkipParse exception handling
Richard Purdie [Fri, 14 Dec 2012 12:33:01 +0000 (12:33 +0000)] 
data_smart/BBHandler: Fix SkipParse exception handling

If SkipParse is raised from something which isn't anonymous python, it wasn't
being handled correctly. This improves the handling for example from within inline
python.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbake
Richard Purdie [Fri, 14 Dec 2012 12:30:27 +0000 (12:30 +0000)] 
bin/bitbake, bb/__init__: Move BBDEBUG handling to bin/bitbake

The method this older code was accessing doesn't exist. A library shouldn't
be changing behaviour based on the environment anyway when sepcific function
calls exist to correctly setup the logging. Fix the crash if BBDEBUG was used
by moving the code to bin/bitbake.

[YOCTO #3319]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocommand: Fix getCmdLineAction bugs
Richard Purdie [Fri, 14 Dec 2012 12:27:33 +0000 (12:27 +0000)] 
command: Fix getCmdLineAction bugs

Executing "bitbake" doesn't get a sane message since the None return value
wasn't being handled correctly. Also fix msg -> cmd_action['msg'] as
otherwise an invalid variable is accessed which then crashes the server
due to the previous bug.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocommand: Add missing import traceback
Richard Purdie [Fri, 14 Dec 2012 12:26:19 +0000 (12:26 +0000)] 
command: Add missing import traceback

Without this, if an exception occurs the server will silently crash
with no feedback to the user about why (since traceback isn't imported).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoBBhandler/data: Fix __inherit_cache duplication
Richard Purdie [Tue, 11 Dec 2012 00:02:50 +0000 (00:02 +0000)] 
BBhandler/data: Fix __inherit_cache duplication

The inherits cache contains duplicate entries, some with the full patch, some
just starting classes/xxx. This is a waste of parse time and potentially
error prone. This patch fixes various pieces of code so the absolute paths are
always preferred and work correctly. The inherits_class function did not work
with full paths so the patch fixes this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoBBHandler/ast: Simplify/fix EXPORT_FUNCTIONS usage
Richard Purdie [Tue, 11 Dec 2012 00:01:56 +0000 (00:01 +0000)] 
BBHandler/ast: Simplify/fix EXPORT_FUNCTIONS usage

The current usage of EXPORT_FUNCTIONS is rather problematic since a class
list (classes) is passed into the ast statement and cached as it was
when first parsed. This class list may be different in other cases but
is locked once in the cache.

Worse, the construction of classes can be broken by exceptions during parsing
at the wrong moments since the state of the parser is not always reset
correctly. This can lead to leakage of other classes into the classes list.

The current EXPORT_FUNCTIONS implementation looks at the last two currently
inherited classes and sets up an indirect function call view the second last
class inherited, e.g.:

 do_configure calls gnomebase_do_configure
 gnomebase_do_configure calls autotools_do_configure

This intermediary doesn't seem to serve a useful purpose.

This patch therefore makes builds deterministic and fixes various cache problems
and indirection by removing the intermediaries and simply performing
directly mapping for the cases where its needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRevert "BBHandler: Ensure parser state engine is correctly reset for new parsing"
Richard Purdie [Fri, 7 Dec 2012 18:08:42 +0000 (18:08 +0000)] 
Revert "BBHandler: Ensure parser state engine is correctly reset for new parsing"

This reverts commit 3dc5e896a97154914cee6c47900e3bb2a2627cdb.

12 years agoBBHandler: Ensure parser state engine is correctly reset for new parsing
Richard Purdie [Fri, 7 Dec 2012 13:10:51 +0000 (13:10 +0000)] 
BBHandler: Ensure parser state engine is correctly reset for new parsing

The classes variable in particular could be in an odd state if parsing of a
previous recipe had abruptly ended.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoxmlrpc: Unbreak the transport by adding a missing logfile name
Richard Purdie [Tue, 4 Dec 2012 17:02:37 +0000 (17:02 +0000)] 
xmlrpc: Unbreak the transport by adding a missing logfile name

I appreciate a fixed value is suboptimal but this is better than not
working at all!

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agouievent: Fix an init race
Richard Purdie [Tue, 4 Dec 2012 16:58:08 +0000 (16:58 +0000)] 
uievent: Fix an init race

There is a race where the registerEventHandler() server call may happen in
a different thread to the main UI, causing the main UI to see
httplib.CannotSendRequest exceptions.

This moves the call into the main thread, removing the init race and fixing
errors I was seeing with the xmlrpc backend.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: modified how the existence of a variable is checked
Cristiana Voicu [Mon, 3 Dec 2012 09:01:19 +0000 (11:01 +0200)] 
hob: modified how the existence of a variable is checked

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Improve get_hash to account for overrides and key expansion
Richard Purdie [Thu, 29 Nov 2012 10:29:06 +0000 (10:29 +0000)] 
data_smart: Improve get_hash to account for overrides and key expansion

An issue was uncovered where changing:

IMAGE_INSTALL_append = "X"

to

IMAGE_INSTALL_append = "X Y"

in local.conf would not get noticed by bitbake. The issue is that
the configuration hash doesn't account for overrides or key expansion.

This patch improves get_hash to account for these. This means the hash
does account for changes like the above.

[YOCTO #3503]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild.py: Preserve sigdata files in the stamps directory
Richard Purdie [Wed, 28 Nov 2012 19:39:23 +0000 (19:39 +0000)] 
build.py: Preserve sigdata files in the stamps directory

Leaving the sigdata files around can aid debugging and doesn't harm
anything. This is the easiest way to allow this to happen.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild/siggen.py: Avoid removing too many stamps when cleaning
Richard Purdie [Wed, 28 Nov 2012 13:34:33 +0000 (13:34 +0000)] 
build/siggen.py: Avoid removing too many stamps when cleaning

The "*" part of the mask is to ensure we clean both any stamp, and any
setscene varient. It turns out we would also trample other tasks,
e.g. do_package_write could trample do_package_write_rpm. do_package also
tramples do_package_write_* but this is less of an issue since the other
tasks depend on it.

Rather than use the wildcard, we can just use a list instead.

[YOCTO #3484]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: when BBLAYERS_NON_REMOVABLE is not set hob shows an error
Cristiana Voicu [Tue, 27 Nov 2012 14:41:31 +0000 (16:41 +0200)] 
hob: when BBLAYERS_NON_REMOVABLE is not set hob shows an error

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2/wget: Fix for mixed-up wget commands
Cristian Iorga [Mon, 26 Nov 2012 17:54:22 +0000 (19:54 +0200)] 
fetch2/wget: Fix for mixed-up wget commands

wget commands for check and resume were
mixed-up, leading to the following issues:

1. long running "NOTE: Preparing runqueue"
reason: objects were downloaded, not spidered on the mirror
2. Failing network test in Build Appliance, because wget 1.14
(in use in BA) will fail if a file already exists.
During the network connectivity test, index.php file was
actually downloaded, not spidered (checked for existence on
yoctoproject.org website), leading to wget failure.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2/local: Fix bug introduced by expression ambiguity
Richard Purdie [Mon, 26 Nov 2012 20:54:30 +0000 (20:54 +0000)] 
fetch2/local: Fix bug introduced by expression ambiguity

The last changes introduced an error in some of the logic. Add brackets
to clarify the meaning of the expression and fix certain build failures.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: make some layers non removable
Cristiana Voicu [Mon, 26 Nov 2012 07:42:36 +0000 (09:42 +0200)] 
hob: make some layers non removable

- there are some layers which cannot be removed; so ,I have used
a new variable called BBLAYERS_NON_REMOVABLE located in bblayers.conf,
which contains those layers which cannot be deleted
- "meta-hob" layer is added to this variable in hob code, like it's
added to BBLAYERS var

[YOCTO #3176]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoUpdate version to 1.17.0
Richard Purdie [Mon, 26 Nov 2012 09:55:32 +0000 (09:55 +0000)] 
Update version to 1.17.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2: Avoid using FILESDIR in unpack
Richard Purdie [Thu, 22 Nov 2012 21:41:21 +0000 (21:41 +0000)] 
fetch2: Avoid using FILESDIR in unpack

Currently there is code which uses FILESDIR in unpack to ensure
parent directories are created, leading to differing behaviour depending on
which search path is used to locate the directory.

This change standardises the code and takes the data from the fetcher in
question meaning we can standardise the code and deprecate FILESDIR.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2/local: Improve handling of wildcard matches
Richard Purdie [Thu, 22 Nov 2012 21:40:18 +0000 (21:40 +0000)] 
fetch2/local: Improve handling of wildcard matches

Currently wildcard matches end up working by FILESDIR being defined
in the metadata to a default of "." in FILESPATH which is hacky at best.

This patch adds the behaviour into the fetcher so its at least slightly
more explicit.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruption
Richard Purdie [Sun, 25 Nov 2012 21:17:41 +0000 (21:17 +0000)] 
knotty/msg: Avoid usage of curses initscr/endwin to avoid terminal corruption

Using curses initscr/endwin causes screen corruption if for example you
suspend bitbake and resume it. This changes the code to use a less
invasive approach to determining colour availability on the terminal.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/builder: Don't rerun sanity checks
Constantin Musca [Tue, 20 Nov 2012 08:09:18 +0000 (10:09 +0200)] 
hob/builder: Don't rerun sanity checks

Run the sanity check only once

[YOCTO #3377]

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: showing when build fails because out of disk space
Cristiana Voicu [Tue, 20 Nov 2012 12:37:46 +0000 (14:37 +0200)] 
hob: showing when build fails because out of disk space

-to enable this in hob, first you have to enable this in bitbake using
BB_DISKMON_DIRS and/or BB_DISKMON_WARNINTERVAL vars
-created "restart the build" action on the build_fail_top_bar

[YOCTO #3357]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserver/process.py: Change timeout error handling
Richard Purdie [Wed, 21 Nov 2012 09:15:34 +0000 (09:15 +0000)] 
server/process.py: Change timeout error handling

In normal usage, we never hit the timeout issue. If we do, it becomes obvious
that the current error handling is not good enough. The request may have made it
to the server and the answer will get queued. This means the next command may get
the return value from the previous command with suitably puzzling results.

Without rewriting large sections of code, its not possible to avoid this problem.
It is better to increase the timeout to several seconds giving the server a chance
to respond and if it does timeout, hard exit since recovery is not possible with the
code base today.

I'd be happy to see the structure of this code improved but this quick fix at least
stops corrupted builds from happening which has to be a good thing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty: Colorize knotty interactive console output
Seth Bollinger [Fri, 16 Nov 2012 01:29:40 +0000 (19:29 -0600)] 
knotty: Colorize knotty interactive console output

Add bold color output to log level name and standard color output to log msg
when bitbake is run from an iteractive console.  Color output is only
enabled
if the terminal supports color.

Used Jason Wessel's recommendation for transparency on verbose, note and
plain.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>