distutils/distutils3: Fix bashism

read -d is a bashism. Replace with a direct exec to avoid the problem
in this case. This fixes silent build failures in do_install of
tasks on systems with dash as /bin/sh.

Also merge the fix to distutils for only changing necessary files
to disutils3 as well.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
initrdscripts: Try to boot if boot label is unknown

The init-live.sh scripts assumes that the boot label set by
the LABELS variable is either "boot", "install", or
"install-efi".  If that variable is overridden to something else
we fall off the end of the case statement and the system locks
up.  If the boot label is unknown, at least attempt to boot.

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
recipes-devtools: fix segfault in lib32-gcc with "." multilib_dir

When enabling a lib32-gcc in a 64 bit build, without doing any
other configuration, the mutilib dir is unspecified, which is
represented internally in gcc as "." and as such uncovers an
invalid free on a non-malloc'd pointer.

As suggested by the gcc folks, simply make sure the "." case
is also stored in a malloc'd pointer, so that the intended
runtime behaviour of the code remains unchanged.

Patch has been accepted by upstream maintainers of gcc.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
patch.bbclass: unset TMPDIR after use

GNU Patch < 2.6.1 has a race condition so we create a per-instance TMPDIR to
avoid this.  This was implemented by setting os.environ[TMPDIR] but at the end
of do_patch the temporary directory is deleted but TMPDIR is not unset.

In general this doesn't cause a problem but if do_patch is embedded in a larger
function then TMPDIR is set to a directory that doesn't exist.  Avoid this by
removing TMPDIR from os.environ when the directory is deleted.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sstate-diff-machines.sh: Return non-zero return code when there was some failure detected

* add --analyze option, which is useful when using from jenkins job
  where you don't want to read output just to dectect how bad it was
* I was always using something like this inside jenkins job, but better
  to share it in original script

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
test-dependencies.sh: Return non-zero return code when there was some failure detected

* this is useful when using from jenkins job where you don't want to read
  output just to dectect how bad it was
* add .log suffix to all files, so they can be easily downloaded from
  http servers without default mimetype set to something useful
* add recipes failed in step 1 to steps 2 and 3 to generate standalone
  logs for them

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libusb: add missing build dependency on udev

This fixes the ./configure error in case libusb is built before udev/systemd.

Signed-off-by: Fabien Chereau <fabien.chereau@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/report-error: tweak summary message

* We don't want everyone to remove their identifying info, just if they
  feel the need to
* Split lines for clarity
* A couple of grammar/spelling tweaks

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base: add auto-completion in setup

Signed-off-by: Dennis Meier <meier.dennis@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base: Remove confusing echo

Remove a confusing echo after the previous commit, thanks for a suggestion
from Laurentiu.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

A
classes/kernel: Use full path for symlink in update-alternatives.

Use a fully qualified path for the <path> parameter in calls
to update-alternatives.  The chkconfig-alternatives version
requires a full path and without it, the symlink is not
properly created.

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>