From update-alternatives.bbclass # This class is used to help the alternatives system which is useful when # multiple sources provide same command. You can use update-alternatives # command directly in your recipe, but in most cases this class simplifies # that job. # # To use this class a number of variables should be defined: # # List all of the alternatives needed by a package: # ALTERNATIVE_<pkg> = "name1 name2 name3 ..." # # i.e. ALTERNATIVE_busybox = "sh sed test bracket" # # The pathname of the link # ALTERNATIVE_LINK_NAME[name] = "target" # # This is the name of the binary once it's been installed onto the runtime. # This name is global to all split packages in this recipe, and should match # other recipes with the same functionality. # i.e. ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/[" # # NOTE: If ALTERNATIVE_LINK_NAME is not defined, it defaults to ${bindir}/name # # The default link to create for all targets # ALTERNATIVE_TARGET = "target" # # This is useful in a multicall binary case # i.e. ALTERNATIVE_TARGET = "/bin/busybox" # # A non-default link to create for a target # ALTERNATIVE_TARGET[name] = "target" # # This is the name of the binary as it's been install by do_install # i.e. ALTERNATIVE_TARGET[sh] = "/bin/bash" # # A package specific link for a target # ALTERNATIVE_TARGET_<pkg>[name] = "target" # # This is useful when a recipe provides multiple alternatives for the # same item. # # NOTE: If ALTERNATIVE_TARGET is not defined, it will inherit the value # from ALTERNATIVE_LINK_NAME. # # NOTE: If the ALTERNATIVE_LINK_NAME and ALTERNATIVE_TARGET are the same, # ALTERNATIVE_TARGET will have '.{BPN}' appended to it. If the file # referenced has not been renamed, it will also be renamed. (This avoids # the need to rename alternative files in the do_install step, but still # supports it if necessary for some reason.) # # The default priority for any alternatives # ALTERNATIVE_PRIORITY = "priority" # # i.e. default is ALTERNATIVE_PRIORITY = "10" # # The non-default priority for a specific target # ALTERNATIVE_PRIORITY[name] = "priority" # # The package priority for a specific target # ALTERNATIVE_PRIORITY_<pkg>[name] = "priority" # # # ----- # # # The following describes deprecated behavior, using any of the # following modes will result in a warning, and eventually an error: # # There are two basic modes supported: 'single update' and 'batch update' # # 'single update' is used for a single alternative command, and you're # expected to provide at least below keywords: # # ALTERNATIVE_NAME - the name that the alternative is registered # ALTERNATIVE_PATH - the path of installed alternative # # ALTERNATIVE_PRIORITY and ALTERNATIVE_LINK are optional which have defaults # in this class. # # 'batch update' is used if you have multiple alternatives to be updated. # Unlike 'single update', 'batch update' in most times only require two # parameters: # # ALTERNATIVE_LINKS - a list of symbolic links for which you'd like to # create alternatives, with space as delimiter, e.g: # # ALTERNATIVE_LINKS = "${bindir}/cmd1 ${sbindir}/cmd2 ..." # # ALTERNATIVE_PRIORITY - optional, applies to all # # To simplify the design, this class has the assumption that for a name # listed in ALTERNATIVE_LINKS, say /path/cmd: # # the name of the alternative would be: cmd # the path of installed alternative would be: /path/cmd.${BPN} # ${D}/path/cmd will be renamed to ${D}/path/cmd.{BPN} automatically # priority will be the same from ALTERNATIVE_PRIORITY # # If above assumption breaks your requirement, then you still need to use # your own update-alternatives command directly. The manual refers to second part in description, which is marked as obsolete.
Updated the section so that the deprecated area is not mentioned. Section now is more generalized. Please review this section and comment. If I receive no comments in a reasonable amount of time I will close the bug. Thanks, Scott http://www.yoctoproject.org/docs/1.4/ref-manual/ref-manual.html#ref-classes-update-alternatives
It is fine.
Thanks for the look Radu. I am going to mark it resolved. Scott