The OpenEmbedded build system now uses one sysroot per recipe to resolve long-standing issues with configuration script auto-detection of undeclared dependencies. Consequently, you might find that some of your previously written custom recipes are missing declared dependencies, particularly those dependencies that are incidentally built earlier in a typical build process and thus are already likely to be present in the shared sysroot in previous releases.
Consider the following:
Declare Build-Time Dependencies: Because of this new feature, you must explicitly declare all build-time dependencies for your recipe. If you do not declare these dependencies, they are not populated into the sysroot for the recipe.
Specify Pre-Installation and Post-Installation
Native Tool Dependencies:
You must specifically specify any special native tool
dependencies of pkg_preinst
and
pkg_postinst
scripts by using the
PACKAGE_WRITE_DEPS
variable.
Specifying these dependencies ensures that these tools
are available if these scripts need to be run on the
build host during the
do_rootfs
task.
As an example, see the dbus
recipe.
You will see that this recipe has a
pkg_postinst
that calls
systemctl
if "systemd" is in
DISTRO_FEATURES
.
In the example,
systemd-systemctl-native
is added to
PACKAGE_WRITE_DEPS
, which is also
conditional on "systemd" being in
DISTRO_FEATURES
.
Examine Recipes that Use
SSTATEPOSTINSTFUNCS
:
You need to examine any recipe that uses
SSTATEPOSTINSTFUNCS
and determine
steps to take.
Functions added to
SSTATEPOSTINSTFUNCS
are still
called as they were in previous Yocto Project releases.
However, since a separate sysroot is now being populated
for every recipe and if existing functions being called
through SSTATEPOSTINSTFUNCS
are
doing relocation, then you will need to change these
to use a post-installation script that is installed by a
function added to
SYSROOT_PREPROCESS_FUNCS
.
For an example, see the
pixbufcache
class in
meta/classes/
in the Yocto Project
Source Repositories.
SSTATEPOSTINSTFUNCS
variable
itself is now deprecated in favor of the
do_populate_sysroot[postfuncs]
task.
Consequently, if you do still have any function or
functions that need to be called after the sysroot
component is created for a recipe, then you would be
well advised to take steps to use a post installation
script as described previously.
Taking these steps prepares your code for when
SSTATEPOSTINSTFUNCS
is
removed in a future Yocto Project release.
Specify the Sysroot when Using Certain
External Scripts:
Because the shared sysroot is now gone, the scripts
oe-find-native-sysroot
and
oe-run-native
have been changed such
that you need to specify which recipe's
STAGING_DIR_NATIVE
is used.
staging.bbclass
"
section.