# Check and generate update-alternatives configuration files for the packages

Source: [https://docs.qualcomm.com/doc/80-88500-2/topic/53_Check_and_generate_update_alternatives_configuration_files_for_your_packages.html](https://docs.qualcomm.com/doc/80-88500-2/topic/53_Check_and_generate_update_alternatives_configuration_files_for_your_packages.html)

Create the update-alternatives configuration files for the package manually. Use the tools to generate update-alternatives configuration files for the package automatically, as shown in the following code:
      
1. Build the code:

        cd pokyCopy to clipboard

        MACHINE=qrb5165-rb5 DISTRO=qti-distro-Ubuntu-fullstack-debug source qti-conf/set_bb_env.shCopy to clipboard

        bitbake qti-Ubuntu-robotics-imageCopy to clipboard
2. Copy the tools from the source code to the build-qti-distro-Ubuntu-fullstack-debug directory and run:

        cd <workspace>/build-qti-distro-Ubuntu-fullstack-debug/Copy to clipboard

        cp ../src/vendor/qcom/opensource/Ubuntu-oss/update-alternatives/tools/* .Copy to clipboard

        ./create_alternatives.pyCopy to clipboard
3. After the script execution is complete, check if your packages have conflict with the Ubuntu OSS packages:
    1. The following message indicates that your packages do not have conflicts with Ubuntu OSS packages.

            ------------------------------------------------------
            -------- Checking passed, No conflict here :) -------
            ------------------------------------------------------Copy to clipboard
    2. The following message indicates that your packages have file conflict with Ubuntu OSS packages.

            --------------------------------------------------------------
            Finished checking, output is in update-alternatives/config/
            --------------------------------------------------------------Copy to clipboard
4. If there is a conflict in file or package name, then submit the changes. If there are no conflicts, skip this step.
    1. If &lt;your bb name&gt;\_%.bbappend exists in  ../poky/meta-qti-ubuntu/recipes-toolchain/bbappends/, append the contents of update-alternatives/config/bbappend/&lt;your bb name&gt;\_%.bbappend to ../poky/meta-qti-ubuntu/recipes-toolchain/bbappends/&lt;your bb name&gt;\_%.bbappend.
              
        If &lt;your bb name&gt;\_%.bbappend does not exist in ../poky/meta-qti-ubuntu/recipes-toolchain/bbappends/, copy update-alternatives/config/bbappend/&lt;your bb name&gt;\_%.bbappend to ../poky/meta-qti-ubuntu/recipes-toolchain/bbappends/.
    2. Copy the files:

            cp update-alternatives/config/inc/<your bb name>.inc ../poky/meta-qti-ubuntu/recipes-toolchain/bbappends/update-alternatives/Copy to clipboard

**Parent Topic:** [Update-alternatives](https://docs.qualcomm.com/doc/80-88500-2/topic/50_Update_alternatives.html)

Last Published: Aug 18, 2023

[Previous Topic
Configure update-alternatives for the packages](https://docs.qualcomm.com/bundle/publicresource/80-88500-2/topics/52_Configure_update_alternatives_for_your_packages.md) [Next Topic
Recover packages from update-alternatives](https://docs.qualcomm.com/bundle/publicresource/80-88500-2/topics/54_Recovery_packages_from_update_alternatives.md)