5.10.5.1. Build Considerations

This section describes build considerations that you need to be aware of in order to provide support for runtime package management.

When BitBake generates packages it needs to know what format(s) to use. In your configuration, you use the PACKAGE_CLASSES variable to specify the format.

Note

You can choose to have more than one format but you must provide at least one.

If you would like your image to start off with a basic package database of the packages in your current build as well as 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 an existing package, it is always a good idea to re-generate the package index with:

    $ bitbake package-index
                    

Realize that it is not sufficient to simply do the following:

    $ bitbake <some-package> package-index
                    

This is because BitBake does not properly schedule the package-index target fully after any other target has completed. Thus, be sure to run the package update step separately.

As described below in the "Using IPK" section, if you are using IPK as your package format, you can make use of the distro-feed-configs recipe provided by meta-oe in order to configure your target to use your IPK databases.

When your build is complete, your packages reside in the ${TMPDIR}/deploy/<package-format> directory. For example, if ${TMPDIR} is tmp and your selected package type is IPK, then your IPK packages are available in tmp/deploy/ipk.