sstate.bbclass: ignore the tar failure.

sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, and
sstate_create_package stores SSTATE_BUILDDIR into a archive file by
tar, these two task can be run simultaneously for different packages,
and make a hardlink for a file will lead to the change of the links
number of file, and if tar is reading this file, it will fail with exit
code 1, and report "file changed as we read it":

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

4b3e353a5[sstate.bbclass: fix parallel building issue] tries to use the
tar parameter --ignore-failed-read to fix, but it does not work, and
tar parameter --warning=no-file-changed can close the warning, but can
not change the exit code. so close shell immediate exit, only fail
if tar returns not 1 and 0.

Exit codes of tar:
    http://www.gnu.org/software/tar/manual/html_section/Synopsis.html

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>
image.bbclass: uninstall package only if it's already installed

Remove a package from rootfs only if it's already installed. Also,
if a package is uninstalled, remove it from installed_pkgs.txt.

[YOCTO #5169]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/testimage: add informational messages about tests and do some cleanup/formatting

Adds info about tests run even if they passed (in case of errors log will
be printed anyway). Also some style change for qemu object.

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>
libav: make X11 dependencies dependent on DISTRO_FEATURES

This enables building libav when x11 is not in DISTRO_FEATURES.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
telepathy-mission-control: do_compile failed (race issue)

There might be an error when parallel build:

[snip]
Traceback (most recent call last):
  File "/path/to/tools/glib-gtypes-generator.py", line 304, in <module>
    GTypesGenerator(dom, argv[1], argv[2])()
  File "/path/to/tools/glib-gtypes-generator.py", line 295, in __call__
    file_set_contents(self.output + '.h', ''.join(self.header))
  File "/path/to/tools/libtpcodegen.py", line 42, in file_set_contents
    os.rename(filename + '.tmp', filename)
OSError: [Errno 2] No such file or directory
[snip]

This is a race issue, the _gen/gtypes.h and _gen/gtypes-body.h may
write(remove/rename) _gen/gtypes.tmp at the same time, then there would
be the error.

There was a similar bug in telepathy-glib which was already fixed, we use the
similar patch to fix it here.

[YOCTO #5184]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kern-tools: fix multi patch application without headers

Updating the kern-tools SRCREV to import the following change:

    kgit-s2q: always update ORIG_HEAD after applying changes

    In situations where git am fails to apply patches, and git apply is used,
    we must update ORIG_HEAD as well as HEAD. This is required, since if the
    next patch in the queue also fails git am application, it will reset to
    ORIG_HEAD before using git apply. If we haven't updated ORIG_HEAD, we'll
    end up warping back to the top of the branch each time.

This problem can only be seen in very specific situations, in particular if
a generated BSP branches from qemuppc, and has a series of non git "am able"
patches. We fail, since all of the qemuppc patches are not applied due to
the branch head constantly being reset.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
boost: set up PACKAGECONFIG for boost-python library

Until now, the comment in the boost.inc file suggested to enable
the boost-python library by uncommenting some lines in that file.
Using the new PACKAGECONFIG feature, boost-python can now be added
optionally without need to modify the file or copying those lines
into a bbappend file.
Furthermore, we obtain the python version by inheriting python-dir
instead of fixing the python version in this file.

This commit is motivated by the need in the meta-ros layer, as
discussed in the issue #145 of the meta-ros issue tracker [1].

[1] https://github.com/bmwcarit/meta-ros/pull/145

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemu: don't claim support for IrDA and PCMCIA

QEMU machines don't have virtual IrDA or PCMCIA hardware, so don't claim to
support them.

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>
autoconf: Add fix for sh verses bash issues

Libtool scripts were finding bash was /bin/sh and then using bashisms which
then got into sstate and used on machines where /bin/sh might be dash.

This changes things to search for bash first since its preferred. We then hardcode
bash into the scripts which is more correct.

This does mean we have a dependency on bash but many of our scripts have
that anyway.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
makedevs: add nativesdk to BBCLASSEXTEND

This is a first in a series of patches to add items
to the nativesdk toolchain tarball.
Many of which are Yocto specific and needed to create a
rootfs with pre and post install hooks successfully run,
using only the toolchain tarball.

End goal is to create a sandbox where _users_ can customize a rootfs from a
package feed with their package manager of choice.

Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libpam: Avoid host contamination issue w. libprelude

Since we dont use prelude in OE, we just disable autodetection of
prelude in the libpam configuration.

Seems like an old bug:
http://lists.openembedded.org/pipermail/openembedded-devel/2012-March/083804.html

Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
elfutils: remove configure bits from patch

That is a generated file and patching it might fail, the patch already patches configure.ac
which will have the configure file regenerated.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_deb, apt.conf: fix apt failure in do_rootfs()

The changes in this commit, dc5f6c3898555b59f16bf809ae4c5418656e6ac9,
moved apt config directory from native SYSROOT to WORKDIR.
Unfortunately, Dir::Etc in apt.conf was not changed accordingly and
sources.list file could not be found during do_rootfs().

This commit fixes this issue.

[YOCTO #5241]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
init-install-efi.sh: Fix root= specification

Fixes [YOCTO #5237]

The current grub.cfg manipulation depends on an existing root=
parameter. If this doesn't exist, the correct root= parameter will not
be added.

Instead, remove any existing root= parameters and add the correct one
explicitly.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: mihaix.lindner@linux.intel.com
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
init-install-efi.sh: Remove unnecessary udev rules file to avoid errors

Fixes [YOCTO #5233]

Modeled after Chen Qi's fix to [YOCTO #3924] from oe-core commit:
6b6db7b4fb7aa17b8e29076decc830149b9d35bc
init-install.sh: remove unnecessary udev rules file to avoid error messages

/etc/udev/scripts/mount.sh is removed by init-install-efi.sh, but the
udev rules file which specifies the invocation of this script is not
removed, thus causing the error message during a live install:

/etc/udev/scripts/mount.sh: No such file or directory

The /etc/udev/rules/automount.rules no longer works once the mount.sh
script is removed. Remove it to avoid the error message.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: mihaix.lindner@linux.intel.com
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
webkit-gtk: limit ld memory requirement

Add --no-keep-memory to LDFLAGS.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
shadow: Move common code to shadow.inc

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
shadow: Turn shadow-native into a BBCLASSEXTEND

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
base-passwd: add shutdown group

Since using useradd in sysvinit causes core-image-minimal to
gain shadow utilites instead of using busybox, we add the
shutdown group directly.

[YOCTO #5230]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sysvinit: don't use useradd

It causes shadow to be used in core-image-minimal and increase the
size by 1.5M.  We will add the shutdown user to group via base-passwd
which we depend upon instead.

[YOCTO #5230]

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