diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml index 2caea272a4..5e35e8946c 100644 --- a/documentation/ref-manual/ref-classes.xml +++ b/documentation/ref-manual/ref-classes.xml @@ -85,35 +85,36 @@ Alternatives - <filename>update-alternatives.bbclass</filename> - Several programs can fulfill the same or similar function and be installed with the same name. + This class helps the alternatives system when multiple sources provide + the same command. + This situation occurs when several programs that have the same or + similar function are installed with the same name. For example, the ar command is available from the busybox, binutils and elfutils packages. - The update-alternatives.bbclass class handles renaming the - binaries so that multiple packages can be installed without conflicts. - The ar command still works regardless of which packages are installed - or subsequently removed. - The class renames the conflicting binary in each package and symlinks the highest - priority binary during installation or removal of packages. - - - Four variables control this class: - - ALTERNATIVE_NAME ‐ The name of the - binary that is replaced (ar in this example). - ALTERNATIVE_LINK ‐ The path to - the resulting binary (/bin/ar in this example). - ALTERNATIVE_PATH ‐ The path to the - real binary (/usr/bin/ar.binutils in this example). - ALTERNATIVE_PRIORITY ‐ The priority of - the binary. - The version with the most features should have the highest priority. - + The update-alternatives.bbclass class handles + renaming the binaries so that multiple packages can be installed + without conflicts. + The ar command still works regardless of which + packages are installed or subsequently removed. + The class renames the conflicting binary in each package and symlinks + the highest priority binary during installation or removal of packages. - Currently, the OpenEmbedded build system supports only one binary per package. + To use this class, you need to define a number of variables. + These variables list alternative commands needed by a package, + provide pathnames for links, default links for targets, and + so forth. + For details on how to use this class, see the comments in the + update-alternatives.bbclass. + + + You can use the update-alternatives command + directly in your recipes. + However, this class simplifies things in most cases. +