ptest bug fixes

Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dpkg, opkg, rpm-postinst: fix overwriting the run-postinstall script

If multiple package managers are installed in the image, they will
overwrite each other's run-postinsts script, resulting in postinstalls
not beeing run at all at first boot.

What this patch does:
 * checks whether opkg/dpks/rpm is actually used to install
   the packages and, only after, creates the run-postinsts script;
 * brings dpkg recipe in sync with opkg: moves the script creation from
   do_install to postinstall;
 * move creation of run-postinsts script (rpm-postinsts recipe) to the
   postinstall scriptlet in order to better control the creation of the
   script according to the package manager used;

[YOCTO #4231]
[YOCTO #4179]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pulseaudio: remove spurious cd in do_compile_prepend

This prepend was cding to ${S}, which then breaks base_do_compile as it assumes
it's in ${B}.  The cd is pointless as all of the operations use absolute paths,
so remove it.

The result of this was that base_do_compile was failing to find the makefiles,
so the compilation happened in do_install.

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