diff options
Diffstat (limited to 'documentation')
-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 62f2327a7e..70766559f8 100644 --- a/documentation/overview-manual/concepts.rst +++ b/documentation/overview-manual/concepts.rst | |||
@@ -912,11 +912,62 @@ the analysis and package splitting process use several areas: | |||
912 | execute on a system and it generates code for yet another machine | 912 | execute on a system and it generates code for yet another machine |
913 | (e.g. :ref:`ref-classes-cross-canadian` recipes). | 913 | (e.g. :ref:`ref-classes-cross-canadian` recipes). |
914 | 914 | ||
915 | The :term:`FILES` variable defines the | 915 | Packages for a recipe are listed in the :term:`PACKAGES` variable. The |
916 | files that go into each package in | 916 | :oe_git:`bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>` |
917 | :term:`PACKAGES`. If you want | 917 | configuration file defines the following default list of packages:: |
918 | details on how this is accomplished, you can look at | 918 | |
919 | :yocto_git:`package.bbclass </poky/tree/meta/classes-global/package.bbclass>`. | 919 | PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
920 | |||
921 | Each of these packages contains a default list of files defined with the | ||
922 | :term:`FILES` variable. For example, the package ``${PN}-dev`` represents files | ||
923 | useful to the development of applications depending on ``${PN}``. The default | ||
924 | list of files for ``${PN}-dev``, also defined in :oe_git:`bitbake.conf | ||
925 | </openembedded-core/tree/meta/conf/bitbake.conf>`, is defined as follows:: | ||
926 | |||
927 | FILES:${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \ | ||
928 | ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \ | ||
929 | ${datadir}/aclocal ${base_libdir}/*.o \ | ||
930 | ${libdir}/${BPN}/*.la ${base_libdir}/*.la \ | ||
931 | ${libdir}/cmake ${datadir}/cmake" | ||
932 | |||
933 | The paths in this list must be *absolute* paths from the point of view of the | ||
934 | root filesystem on the target, and must *not* make a reference to the variable | ||
935 | :term:`D` or any :term:`WORKDIR` related variable. A correct example would be:: | ||
936 | |||
937 | ${sysconfdir}/foo.conf | ||
938 | |||
939 | .. note:: | ||
940 | |||
941 | The list of files for a package is defined using the override syntax by | ||
942 | separating :term:`FILES` and the package name by a semi-colon (``:``). | ||
943 | |||
944 | A given file can only ever be in one package. By iterating from the leftmost to | ||
945 | rightmost package in :term:`PACKAGES`, each file matching one of the patterns | ||
946 | defined in the corresponding :term:`FILES` definition is included in the | ||
947 | package. | ||
948 | |||
949 | .. note:: | ||
950 | |||
951 | To find out which package installs a file, the ``oe-pkgdata-util`` | ||
952 | command-line utility can be used:: | ||
953 | |||
954 | $ oe-pkgdata-util find-path '/etc/fstab' | ||
955 | base-files: /etc/fstab | ||
956 | |||
957 | For more information on the ``oe-pkgdata-util`` utility, see the section | ||
958 | :ref:`dev-manual/debugging:Viewing Package Information with | ||
959 | \`\`oe-pkgdata-util\`\`` of the Yocto Project Development Tasks Manual. | ||
960 | |||
961 | To add a custom package variant of the ``${PN}`` recipe named | ||
962 | ``${PN}-extra`` (name is arbitrary), one can add it to the | ||
963 | :term:`PACKAGE_BEFORE_PN` variable:: | ||
964 | |||
965 | PACKAGE_BEFORE_PN += "${PN}-extra" | ||
966 | |||
967 | Alternatively, a custom package can be added by adding it to the | ||
968 | :term:`PACKAGES` variable using the prepend operator (``=+``):: | ||
969 | |||
970 | PACKAGES =+ "${PN}-extra" | ||
920 | 971 | ||
921 | Depending on the type of packages being created (RPM, DEB, or IPK), the | 972 | Depending on the type of packages being created (RPM, DEB, or IPK), the |
922 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` | 973 | :ref:`do_package_write_* <ref-tasks-package_write_deb>` |