diff options
| -rw-r--r-- | documentation/overview-manual/concepts.rst | 61 |
1 files changed, 56 insertions, 5 deletions
diff --git a/documentation/overview-manual/concepts.rst b/documentation/overview-manual/concepts.rst index e70c778263..c7e062bdfb 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst | |||
| @@ -939,11 +939,62 @@ the analysis and package splitting process use several areas: | |||
| 939 | execute on a system and it generates code for yet another machine | 939 | execute on a system and it generates code for yet another machine |
| 940 | (e.g. cross-canadian recipes). | 940 | (e.g. cross-canadian recipes). |
| 941 | 941 | ||
| 942 | The :term:`FILES` variable defines the | 942 | Packages for a recipe are listed in the :term:`PACKAGES` variable. The |
| 943 | files that go into each package in | 943 | :oe_git:`bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>` |
| 944 | :term:`PACKAGES`. If you want | 944 | configuration file defines the following default list of packages:: |
| 945 | details on how this is accomplished, you can look at | 945 | |
| 946 | :yocto_git:`package.bbclass </poky/tree/meta/classes/package.bbclass>`. | 946 | PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
| 947 | |||
| 948 | Each of these packages contains a default list of files defined with the | ||
| 949 | :term:`FILES` variable. For example, the package ``${PN}-dev`` represents files | ||
| 950 | useful to the development of applications depending on ``${PN}``. The default | ||
| 951 | list of files for ``${PN}-dev``, also defined in :oe_git:`bitbake.conf | ||
| 952 | </openembedded-core/tree/meta/conf/bitbake.conf>`, is defined as follows:: | ||
| 953 | |||
| 954 | FILES:${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \ | ||
| 955 | ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \ | ||
| 956 | ${datadir}/aclocal ${base_libdir}/*.o \ | ||
| 957 | ${libdir}/${BPN}/*.la ${base_libdir}/*.la \ | ||
| 958 | ${libdir}/cmake ${datadir}/cmake" | ||
| 959 | |||
| 960 | The paths in this list must be *absolute* paths from the point of view of the | ||
| 961 | root filesystem on the target, and must *not* make a reference to the variable | ||
| 962 | :term:`D` or any :term:`WORKDIR` related variable. A correct example would be:: | ||
| 963 | |||
| 964 | ${sysconfdir}/foo.conf | ||
| 965 | |||
| 966 | .. note:: | ||
| 967 | |||
| 968 | The list of files for a package is defined using the override syntax by | ||
| 969 | separating :term:`FILES` and the package name by a semi-colon (``:``). | ||
| 970 | |||
| 971 | A given file can only ever be in one package. By iterating from the leftmost to | ||
| 972 | rightmost package in :term:`PACKAGES`, each file matching one of the patterns | ||
| 973 | defined in the corresponding :term:`FILES` definition is included in the | ||
| 974 | package. | ||
| 975 | |||
| 976 | .. note:: | ||
| 977 | |||
| 978 | To find out which package installs a file, the ``oe-pkgdata-util`` | ||
| 979 | command-line utility can be used:: | ||
| 980 | |||
| 981 | $ oe-pkgdata-util find-path '/etc/fstab' | ||
| 982 | base-files: /etc/fstab | ||
| 983 | |||
| 984 | For more information on the ``oe-pkgdata-util`` utility, see the section | ||
| 985 | :ref:`dev-manual/debugging:Viewing Package Information with | ||
| 986 | \`\`oe-pkgdata-util\`\`` of the Yocto Project Development Tasks Manual. | ||
| 987 | |||
| 988 | To add a custom package variant of the ``${PN}`` recipe named | ||
| 989 | ``${PN}-extra`` (name is arbitrary), one can add it to the | ||
| 990 | :term:`PACKAGE_BEFORE_PN` variable:: | ||
| 991 | |||
| 992 | PACKAGE_BEFORE_PN += "${PN}-extra" | ||
| 993 | |||
| 994 | Alternatively, a custom package can be added by adding it to the | ||
| 995 | :term:`PACKAGES` variable using the prepend operator (``=+``):: | ||
| 996 | |||
| 997 | PACKAGES =+ "${PN}-extra" | ||
| 947 | 998 | ||
| 948 | Depending on the type of packages being created (RPM, DEB, or IPK), the | 999 | Depending on the type of packages being created (RPM, DEB, or IPK), the |
| 949 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` | 1000 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` |
