After source code is configured, compiled, and staged, the build system analyzes the results and splits the output into packages:
![]() |
The
do_package
and
do_packagedata
tasks combine to analyze the files found in the
D
directory and split them into subsets based on available
packages and files.
Analysis involves the following as well as other items:
splitting out debugging symbols, looking at shared library
dependencies between packages, and looking at package
relationships.
The do_packagedata
task creates
package metadata based on the analysis such that the
build system can generate the final packages.
The
do_populate_sysroot
task stages (copies) a subset of the files installed by
the
do_install
task into the appropriate sysroot.
Working, staged, and intermediate results of the analysis
and package splitting process use several areas:
PKGD
:
The destination directory
(i.e. package
) for packages
before they are split into individual packages.
PKGDESTWORK
:
A temporary work area (i.e.
pkgdata
) used by the
do_package
task to save
package metadata.
PKGDEST
:
The parent directory (i.e.
packages-split
) for packages
after they have been split.
PKGDATA_DIR
:
A shared, global-state directory that holds
packaging metadata generated during the packaging
process.
The packaging process copies metadata from
PKGDESTWORK
to the
PKGDATA_DIR
area where it
becomes globally available.
STAGING_DIR_HOST
:
The path for the sysroot for the system on which
a component is built to run (i.e.
recipe-sysroot
).
STAGING_DIR_NATIVE
:
The path for the sysroot used when building
components for the build host (i.e.
recipe-sysroot-native
).
STAGING_DIR_TARGET
:
The path for the sysroot used when a component that
is built to execute on a system and it generates
code for yet another machine (e.g. cross-canadian
recipes).
The
FILES
variable defines the files that go into each package in
PACKAGES
.
If you want details on how this is accomplished, you can
look at
package.bbclass
.
Depending on the type of packages being created (RPM, DEB,
or IPK), the
do_package_write_*
task creates the actual packages and places them in the
Package Feed area, which is
${TMPDIR}/deploy
.
You can see the
"Package Feeds"
section for more detail on that part of the build process.
deploy/*
directories does not
exist.
Creating such feeds usually requires some kind of feed
maintenance mechanism that would upload the new
packages into an official package feed (e.g. the
Ångström distribution).
This functionality is highly distribution-specific
and thus is not provided out of the box.