oprofile: avoid processing files under .pc

Fix the below issue:
| DEBUG: Executing shell function do_configure
| sed: can't read ./.pc/opstart.patch/doc/opstop.1.in: Permission denied
| sed: can't read ./.pc/opstart.patch/doc/opstart.1.in: Permission
denied
| sed: can't read ./.pc/opstart.patch/utils/opstart.c: Permission denied
| ERROR: Function failed: do_configure

Signed-off-by: Ting Liu <b28495@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
insane.bbclass: removing outdated comment

This commit removes an outdated comment that recorded an issue that has been
resolved in the commits 1c75a5df6845090480deff20f469f177501d2182 and
d2d5456cd3b3bd3e52a5dedccca4d46e3a7986d1. Probably, the comment was missed
when changing the behavior in those commits.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
mesa-dri: add extra dri drivers

 * By default enable only swrast.  This needs to
   be here or for some reason qemuarm tries to
   detect the intel dri libraries and fails.
 * For x86 and x86-64 explicitly set all of
   the supported drm drivers.

 builds properly with qemux86 qemuarm and qemux86-64

Signed-off-by: Ian Reinhart Geiser <igeiser@devonit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel: avoid copying unnecessary files during do_install

kernel_do_install() populates $kerneldir with files needed to build
external modules. To accomplish this there are several copy commands
to get source from the kernel source tree and build trees after which
a 'clean' is performed. Since we are copying from the build tree we
get about 1G of .o and .cmd files copied over only to have them
removed when we clean. This adds additional IO overhead as well as
overhead caused by pseudo. By avoiding copying these files in the
first place we get multiple gains:
  * avoid initial copy
  * avoid file deletes during clean
  * reduce pseudo overhead

Additionally we are making use of cpio vs cp which tends to be
significantly faster at performing copies.

With these changes I observe a 15-30% decrease in the time to complete
the do_install() operation on the kernel.

[YOCTO #3517]

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
multilib: skip packages that provide virtual/kernel

Rather than keying on recipes that inherit kernel.bbclass, we should
be checking for providers of virtual/kernel when skipping kernel
recipes in multlib builds.

Not all providers of virtual/kernel inherit kernel.bbclass (notably
linux-dummy), so checking on the provider is a more complete check.

We need to be sure to check for inheritance of module-base as well, this
allows for packages that provides modules to avoid the multilib renaming.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libaio: Fix MIPS system call interface

The io_syscallX wrappers in syscall-mips.h discard error return status
by overwriting the value returned in v0 from the system call with -1.

Modify this behavior by returning the negative of the return value on
error (as identified by a3 != 0). This convention is consistent with
the behavior observed in syscall-ppc.h.

For a description of the MIPS system call interface, see:

http://www.linux-mips.org/wiki/Syscall

Signed-off-by: Phil Staub <Phil.Staub@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
connman-gnome: Add DEPENDS on intltool-native

When 'bitbake -c configure connman-gnome' is executed from scratch, it fails
with syntax error parsing `IT_PROG_INTLTOOL(0.35.0)' in configure.in. This
is caused by its definition is not included into aclocal.m4

Adding intltool-native to DEPENDS is gonna fix it.

[YOCTO #3815]
[ CQID: WIND00401118 ]

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
mini-x-session: Fix runtime when using without session contents

The script where behaving badly when the session directory does not
exist and also lacking a dependency to 'sudo'. Instead of adding a
dependency on 'sudo' we use 'su' as done in xserver-common.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dpkg-native:fix dpkg-scanpackages error at deb image creation time on Fedora 17

Invoking dpkg-scanpackages on Fedora 17 to build deb image meets such an error:

Can't locate Dpkg.pm in @INC  (@INC contains: /usr/local/lib64/perl5 /usr/loc
al/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr
/lib64/perl5 /usr/share/perl5.) at tmp/sysroots/x86_64-linux/usr/bin/dpkg-sca
npackages line 27.

1. The dpkg-scanpackages is invoked at deb image creation time and it is built
by dpkg-native. The dpkg-scanpackages is a perl script and import module `Dpkg'.

2. The Dpkg.pm has been installed in perl's staging dir at dpkg-native compiling
time. Such as `tmp/sysroots/x86_64-linux/usr/lib/perl-native/perl/Dpkg.pm'

3. The dpkg-native uses create_wrapper to relocate to perl-native if perl-native
has been built. If perl-native isn't built, it will use the host Dpkg as default.

4. If dpkg-native is built on a new build envionment which means perl-native doesn't
exist before, and the build system doesn't install dpkg (such as Fedora 17), the
dpkg-scanpackages could not work correctly.

5. Modify dpkg-native's depends, change `perl-native-runtime' to `perl-native', Let
perl-native automatically be built before building dpkg-native.

[YOCTO #3817]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
QT4: use '-no-neon' if cpu does not support neon

Some armv7a cpu does not support neon, like SPEAr1310,
so we should check against "neon" in TUNE_FEATURES.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sqlite3: Ensure MLPREFIX is applied to AUTO_LIBNAME_PKGS

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
multilib.conf: Use BASELIB to set baselib, not hardcode the value

(From OE-Core rev: 1a97cab9d4856e8948025ce6f406c76a2732ec36)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package: Rename splitfile functions to something more descriptive

The splitfile and splitfile2 function names are confusing and the comments
are also misleading, hard to understand or plain incorrect. This tries to
improve things.

(From OE-Core rev: 46f3050a1f46f814e2d031e7e71600b2932d631c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Improve kernel module handling

Currently the kernel module handling consists of several special cases
and has its own path walking. This refactors the code to handle them in
a more standardised way which is also a bit more efficient.

(From OE-Core rev: ad51b54f0afe8c56033137b7cf9ba398877b2651)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Add a shortcut exit from the mkdir function

The mkdir function iterates over strings with many different operations,
even if ultimately the target already exists. This adds a check to the start
of the function so we don't waste time when the target already exists.

(From OE-Core rev: 06e188e673313f1eb9ae7d85ae64467c8d2a94b3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Check FILES once, not once per loop iteration

There is no need to check FILES in each loop iteration, we can just check it once
at the start when we read the variable.

(From OE-Core rev: 1bcc5cba12cbb1b846b433719d1b0820f5a97105)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Avoid copying the datastore for FILES handling

There is no real point in adjusting overrides and creating a copy of the datastore,
just to access a single variable. We can do this just as easily with a slightly
more complicated getVar call. This improves performance.

(From OE-Core rev: 69f4351809359a0c7c38e8f233f3e3f7680ed2e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Move PKG handling code to emit_pkgdata

We only use the PKG variable in emit_pkgdata so we might as well move the
fallback code there, allowing restructuring of other parts of the metadata.

(From OE-Core rev: 0136ae9a5f719f0e7ba6e00bfd366c0e61b3b3f2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Split out package_fixsymlinks function

The symlink handling code doesn't need to being part of populate_packages
and is logically separate so split it out into a separate function,
package_fixsymlinks.

(From OE-Core rev: fc964ed2b558b08327e2bc8c93ada80ca9d97337)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Tweak PACKAGEFUNCS

Move package_rename_hook call into PACKAGEFUNCS and also move package_get_auto_pr
to a more appropriate execution point, grouping package metadata handling
functions together.

(From OE-Core rev: a3f41cfbc8923e54198d10db292a11ef2edda4d7)

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