bitbake: cooker: updateCache should rause exceptions, not sys.exit

Exiting from the server is antisocial, instead we should raise an exception. This
will correctly fail the current command and reset the server state. We use
the handled exception since for these conditions to occur, something was
already displayed to the user.

(Bitbake rev: dacc94bcace85a2e95aee2dccd8e680c59e4545f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sstate.bbclass: fix parallel building issue

sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, then
sstate_create_package will store SSTATE_BUILDDIR into a archive file by
tar, but once other packages install the same file into sysroot, the
creating the archive file will fail with below error:

    DEBUG: Executing shell function sstate_create_package
    tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed as we read it

This kind of error is harmless, use --ignore-failed-read to ignore it.
The error in tar occurs when the timestamp of the file changes and this
can happen when the number of symlinks change. The file will be included
in the archive.

[YOCTO #5122]

(From OE-Core rev: 4b3e353a532c7b68b0bb86df4a2fcc44f8bb3ef2)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bb-matrix: Clean before, rather than after, building

This makes sure the the first build starts from a clean state. Otherwise
one could have the first build affected by any leftover state from
a previous build.

This also leaves a working state behind after the final build.

(From OE-Core rev: f8f86ac88aa1bba99ba28762cfbd97d3721da7d9)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf: Stop providing ${P} and ${PF} by default

For a long time we've provided PN-PV and PN-PV-PR by tweaking PROVIDES. This looks
nice at first glance however it turns out to be a bit problematic. Taking make as an
example where there are two versions, 3.81 and 3.82, what should "bitbake make-3.81" do?

Currently it builds make-3.81 and make-3.82 and breaks in interesting ways. Is that
a bitbake bug? Well, it certainly shouldn't try and run the build. Why is it building
3.82 though? Its due to finding a dependency on "make-dev" and then trying to figure
out what provides it? The answer is "make" and the default version of "make" is 3.82.

So arguably, finding "make-3.81" should infer PREFERRED_VERSION_make = "3.81". Doing
so resolved the above problem since now "make" resolves to "make-3.81".

So what about if we have Recipe A:
DEPENDS = "make-3.81"
and Recipe B:
DEPENDS = "make-3.82"

That is clearly an error, easy. So finally what about if we have Recipe A:
DEPENDS = "make-3.81"
and Recipe B:
DEPENDS = "make"

The first recipe infers the PREFERRED_VERSION_make = "3.81" and then forces that
version on everything else. Is that desired? Probably not in most cases, at least not
silently.

As mitigation, we could print a WARNING about this happening. The final part of the problem
is that we can ony figure this out within bitbake itself. That means we'd have to teach bitbake
about the PN-PV format of PROVIDES which is breaking the separation between bitbake and the
metadata. We can't win :(.

Nobody that I know of is using or relying on this functionality so perhaps we should
just remove it instead which is what this patch does. Opinions?

(From OE-Core rev: a87c205bb6cefd5e1a41b8e7ef02b5bfa380e3b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bb-matrix-plot: Use interpolation for sparse data

If not every combination of BB_NUMBER_THREADS and PARALLEL_MAKE have
been tested by bb-matrix.sh, e.g., by using BB_RANGE="04 08 10 12 16"
and PM_RANGE="04 08 10 12 16", then the graph that gnuplot generates by
default looks very jagged due to the missing data points. By using
splines to interpolate the missing data the graph looks a lot better.

This should not change graphs where all data points are available in any
way, only improve sparse graphs.

(From OE-Core rev: 9642c1314da64c70254f6b012aa73ef37bbaa33f)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: source should be ready after do_unpack

In perf.bb:

S = "${STAGING_KERNEL_DIR}"

So the source should be ready after the do_unpack, and we need this:

do_unpack[depends] += "virtual/kernel:do_populate_sysroot"

Otherwise, maybe no source after do_unpack.

[YOCTO #5168]

(From OE-Core rev: 01d3b15518b981199120b3b9c6923678244aefdc)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
icu-native: do_install: Segmentation fault

There was a "Segmentation fault" error when build icu-native when the
TMPDIR is in a deep directory (for example, when len(readlink -f $TMPDIR
== 410)), use LARGE_BUFFER_MAX_SIZE for cmd rather than
SMALL_BUFFER_MAX_SIZE would fix the problem, this should be a misplay
because other cmd uses LARGE_BUFFER_MAX_SIZE.

[YOCTO #5171]

(From OE-Core rev: ebfdddc23ff78231a819c62c8ffcced9633aa08b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf: include machine name in DEPLOY_DIR_IMAGE

This allows a clean seperation between image outputs from different
machines, and makes it possible to have convenience symlinks to make
the output ready to deploy.

This did require some surgery in runqemu; if explicit paths to the image
and kernel are not supplied then DEPLOY_DIR_IMAGE needs to be determined
from bitbake or set in the environment. However the script does try to
avoid requiring it unless it really is needed. Corresponding changes
were made in the automated testing code as well.

Based on an RFC patch by Koen Kooi <koen@dominion.thruhere.net>

(From OE-Core rev: 7e90261aec61f79680b5eaeaf5b18c7b795412a4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
layer.conf: Version bump for DEPLOY_DIR layout change

Increase the version to signify the layout change of the images
in the deploy directory.

(From OE-Core rev: 4246e7dd59800a1d6c6d02c00f4e86eeac020767)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory

Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.

This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.

With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.

The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.

It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.

(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oeqa/runtime: timeout increases

Increase the timeout for smart commands as under load for qemumips
it's still to small. Also give ping more time fixing a potential
timeout for sato systemd.

(From OE-Core rev: daa3ad5807f6fc0d15b9310937d07a16edac6d22)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-libc-headers: Add big warning about antisocial behaviour

I'm getting concerned with the number of people forking this recipe
and not understanding what they're doing. I'm therefore proposing
adding in a suitable warning to people thinking of copying it.

(From OE-Core rev: c27ac156bcaf3193d52f456480947b0cfaef3c72)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
adt-installer: fix opkg repo name

I mistakenly named the allarch opkg repo the same as nativesdk one...

This patch fixes it.

[YOCTO #5181]

(From OE-Core rev: 98f39b0ae4ed45194a165de3913f27745481cb7a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
anjuta-remote-run: remove

This is from the Anjuta integration which was removed many years ago.

(From OE-Core rev: db488bf8130dba2ad8771b0634e3c5de452f23f2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
LSB Command Check: fix install_initd and remove_initd not found

The install_initd and remove_initd are linked to /sbin/chkconfig for lsb
core test, but chkconfig has been moved from /sbin to /usr/sbin in order
to fix QA warning about unsafe references in binaries.
(In commit e486242db83297701803866bea971a2f1a1135fe)

Let install_initd and remove_initd link to /usr/sbin/chkconfig could fix
this issue.

[YOCTO #5152]

(From OE-Core rev: 789c4c13c5095a2865d1ee1b242141b5b076bed5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oprofileui-server: Add systemd support

-Remove dependency on meta-systemd

(From OE-Core rev: 177bf318bcd3dd2bfb3bec094b1f5ccac7bdd9ac)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
apmd: Add systemd support

-Remove dependency on meta-systemd

(From OE-Core rev: 9e963fe587dda3ce77707194fc5dd029188c76d8)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/build-perf-test.sh: record size in kb and remove extra spaces

(From OE-Core rev: 8c2b5948d41d753982242cd86a1498ab4f1bb317)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: link runlevel from systemctl

using update-alternatives to link runlevel from systemctl, as on Fedora 18

(From OE-Core rev: 8909b3b71b2ac792ae092b8f0a6c2ade28f6b73b)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
xf86-video-vmware: disable VMWGFX

Our Mesa doesn't yet ship the XA Gallium state tracker that the VMWGFX
sub-driver needs, so just disable vmwgfx.

Also remove a spurious xvmc dependency.

(From OE-Core rev: a6f84a0317997c3f49e136381f8d2f2f5cadd292)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>