This section describes build considerations of which you need to be aware in order to provide support for runtime package management.
When BitBake generates packages, it needs to know
what format or formats to use.
In your configuration, you use the
PACKAGE_CLASSES
variable to specify the format:
Open the local.conf
file
inside your
Build Directory
(e.g. ~/poky/build/conf/local.conf
).
Select the desired package format as follows:
PACKAGE_CLASSES ?= “package_packageformat
”
where packageformat
can be "ipk", "rpm", "deb", or "tar" which are the
supported package formats.
If you would like your image to start off with a basic
package database containing the packages in your current
build as well as to have the relevant tools available on the
target for runtime package management, you can include
"package-management" in the
IMAGE_FEATURES
variable.
Including "package-management" in this configuration
variable ensures that when the image is assembled for your
target, the image includes the currently-known package
databases as well as the target-specific tools required
for runtime package management to be performed on the
target.
However, this is not strictly necessary.
You could start your image off without any databases
but only include the required on-target package
tool(s).
As an example, you could include "opkg" in your
IMAGE_INSTALL
variable if you are using the IPK package format.
You can then initialize your target's package database(s)
later once your image is up and running.
Whenever you perform any sort of build step that can potentially generate a package or modify existing package, it is always a good idea to re-generate the package index after the build by using the following command:
$ bitbake package-index
It might be tempting to build the package and the package index at the same time with a command such as the following:
$ bitbake some-package
package-index
Do not do this as BitBake does not schedule the package index for after the completion of the package you are building. Consequently, you cannot be sure of the package index including information for the package you just built. Thus, be sure to run the package update step separately after building any packages.
You can use the
PACKAGE_FEED_ARCHS
,
PACKAGE_FEED_BASE_PATHS
,
and
PACKAGE_FEED_URIS
variables to pre-configure target images to use a package
feed.
If you do not define these variables, then manual steps
as described in the subsequent sections are necessary to
configure the target.
You should set these variables before building the image
in order to produce a correctly configured image.
When your build is complete, your packages reside in the
${TMPDIR}/deploy/
directory.
For example, if
packageformat
${
TMPDIR
}
is tmp
and your selected package type
is RPM, then your RPM packages are available in
tmp/deploy/rpm
.