Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 776e4da5 authored by Justin Yun's avatar Justin Yun
Browse files

Update error message for easier error resolution

Update the error message of file_list_diff tool for users to resolve
the errors easily.
Also, add comments to classify the modules in the allowlist.

Bug: 368185982
Test: m

Change-Id: Id9925f700c48894f073157b6187d5aa4bde78398
parent d41e620d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
# Known diffs only in the KATI system image
etc/NOTICE.xml.gz
framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex
framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.odex.fsv_meta
framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex
framework/oat/x86_64/apex@com.android.compos@javalib@service-compos.jar@classes.vdex.fsv_meta

# Known diffs that are installed in either system image with the configuration
# b/353429422
init.environ.rc
# b/338342381
etc/NOTICE.xml.gz

# Known diffs only in the Soong system image
lib/libhidcommand_jni.so
+11 −10
Original line number Diff line number Diff line
@@ -34,23 +34,24 @@ def find_unique_items(kati_installed_files, soong_installed_files, allowlist, sy
    unique_in_soong = set(filter(is_unknown_diff, soong_files - kati_files))

    if unique_in_kati:
        print(f'{COLOR_ERROR}Please add following modules into system image module {system_module_name}.{COLOR_NORMAL}')
        print(f'{COLOR_WARNING}KATI only module(s):{COLOR_NORMAL}')
        print('')
        print(f'{COLOR_ERROR}Missing required modules in {system_module_name} module.{COLOR_NORMAL}')
        print(f'To resolve this issue, please add the modules to the Android.bp file for the {system_module_name} to install the following KATI only installed files.')
        print(f'You can find the correct Android.bp file using the command "gomod {system_module_name}".')
        print(f'{COLOR_WARNING}KATI only installed file(s):{COLOR_NORMAL}')
        for item in sorted(unique_in_kati):
            print(item)
            print('  '+item)

    if unique_in_soong:
        if unique_in_kati:
        print('')

        print(f'{COLOR_ERROR}Please add following modules into build/make/target/product/base_system.mk.{COLOR_NORMAL}')
        print(f'{COLOR_WARNING}Soong only module(s):{COLOR_NORMAL}')
        print(f'{COLOR_ERROR}Missing packages in base_system.mk.{COLOR_NORMAL}')
        print('Please add packages into build/make/target/product/base_system.mk or build/make/tools/filelistdiff/allowlist to install or skip the following Soong only installed files.')
        print(f'{COLOR_WARNING}Soong only installed file(s):{COLOR_NORMAL}')
        for item in sorted(unique_in_soong):
            print(item)
            print('  '+item)

    if unique_in_kati or unique_in_soong:
        print('')
        print(f'{COLOR_ERROR}FAILED: System image from KATI and SOONG differs from installed file list.{COLOR_NORMAL}')
        sys.exit(1)