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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>