4a693b28e6
The reason that the jar file depended on modules_to_install was to collect files from other partitions, not just system. It isn't the intention to gather fake modules like phony modules and more importantly their dependencies (LOCAL_REQUIRE_MODULES). This change explicitly filters out the fake modules to make the intent clearer. In fact, the jar file depending on fake modules can have a side effect that overridden modules are installed. It can happen as follows: PRODUCT_PACKAGES += A B C LOCAL_MODULE := A LOCAL_REQUIRED_MODULES := B include $(BUILD_PHONY_PACKAGE) LOCAL_MODULE := B include $(BUILD_XXX) ... LOCAL_MODULE := C LOCAL_OVERRIDES_MODULES := B include $(BUILD_XXX) modules_to_install is set to out/target/product/xxx/fake_packages/A-timestamp out/target/product/xxx/system/.../C ; B is correctly overridden. But there still is an order-only dependency from A to B which is created by add-all-target-to-target-required-modules-deps. Unfortunately, overridden isn't take into account here. So, if the jacoco jar file depends on modules_to_install, both B and C are installed. And if the creation of system.img happens later, the two are included together, which is an error. A preferred way of fixing this is to amend add-all-target-to-target-required-modules-deps so that override is take into account. However, it will likely to require more Make tricks. This change takes a much easier path; pruning the fake packages from the dependencies so that its dependencies which might be wrong can't be installed. Bug: 175400393 Test: build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true SOONG_COLLECT_JAVA_DEPS=true TARGET_PRODUCT=cf_x86_phone TARGET_BUILD_VARIANT=userdebug TARGET_USERDATAIMAGE_PARTITION_SIZE=17179869184 droid dist DIST_DIR=out/dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device" continuous_instrumentation_tests continuous_native_tests device-tests platform_tests No com.android.art.apex in system.img Change-Id: Ie8a917b7c3985c3a4f19372a4430accd84124e83 |
||
---|---|---|
.. | ||
clang | ||
combo | ||
tasks | ||
aapt2.mk | ||
aapt_flags.mk | ||
allowed_ndk_types.mk | ||
android_manifest.mk | ||
android_soong_config_vars.mk | ||
app_certificate_validate.mk | ||
app_prebuilt_internal.mk | ||
artifact_path_requirements.mk | ||
autogen_test_config.mk | ||
base_rules.mk | ||
binary.mk | ||
board_config.mk | ||
build-system.html | ||
build_id.mk | ||
build_rro_package.mk | ||
cc_prebuilt_internal.mk | ||
ccache.mk | ||
check_elf_file.mk | ||
checktree | ||
cleanbuild.mk | ||
cleanspec.mk | ||
clear_vars.mk | ||
config.mk | ||
config_sanitizers.mk | ||
configure_module_stem.mk | ||
copy_headers.mk | ||
cxx_stl_setup.mk | ||
definitions.mk | ||
deprecation.mk | ||
device.mk | ||
dex_preopt.mk | ||
dex_preopt_config.mk | ||
dex_preopt_libart.mk | ||
dex_preopt_odex_install.mk | ||
distdir.mk | ||
dumpvar.mk | ||
dynamic_binary.mk | ||
empty_test_config.xml | ||
envsetup.mk | ||
executable.mk | ||
executable_internal.mk | ||
executable_prefer_symlink.mk | ||
filter_symbols.sh | ||
force_aapt2.mk | ||
fuzz_test.mk | ||
generate_enforce_rro.mk | ||
goma.mk | ||
header_library.mk | ||
header_library_internal.mk | ||
host_dalvik_java_library.mk | ||
host_dalvik_static_java_library.mk | ||
host_executable.mk | ||
host_executable_internal.mk | ||
host_java_library.mk | ||
host_java_library_common.mk | ||
host_prebuilt.mk | ||
host_shared_library.mk | ||
host_shared_library_internal.mk | ||
host_static_library.mk | ||
host_static_library_internal.mk | ||
install_jni_libs.mk | ||
install_jni_libs_internal.mk | ||
instrumentation_test_config_template.xml | ||
jacoco.mk | ||
java.mk | ||
java_common.mk | ||
java_host_test_config_template.xml | ||
java_host_unit_test_config_template.xml | ||
java_library.mk | ||
java_prebuilt_internal.mk | ||
java_renderscript.mk | ||
java_test_config_template.xml | ||
jetifier.mk | ||
link_type.mk | ||
LINUX_KERNEL_COPYING | ||
local_current_sdk.mk | ||
local_systemsdk.mk | ||
local_vndk.mk | ||
main.mk | ||
Makefile | ||
misc_prebuilt_internal.mk | ||
module_arch_supported.mk | ||
multi_prebuilt.mk | ||
multilib.mk | ||
native_benchmark_test_config_template.xml | ||
native_host_test_config_template.xml | ||
native_test.mk | ||
native_test_config_template.xml | ||
ninja_config.mk | ||
node_fns.mk | ||
notice_files.mk | ||
OWNERS | ||
pack_dyn_relocs_setup.mk | ||
package.mk | ||
package_internal.mk | ||
pathmap.mk | ||
phony_package.mk | ||
prebuilt.mk | ||
prebuilt_internal.mk | ||
process_wrapper.sh | ||
process_wrapper_gdb.cmds | ||
process_wrapper_gdb.sh | ||
product-graph.mk | ||
product.mk | ||
product_config.mk | ||
proguard.flags | ||
proguard.jacoco.flags | ||
proguard_basic_keeps.flags | ||
project_definitions.mk | ||
python_binary_host_test_config_template.xml | ||
rbe.mk | ||
robolectric_test_config_template.xml | ||
root.mk | ||
rust_device_test_config_template.xml | ||
rust_host_test_config_template.xml | ||
sdk_check.mk | ||
sdk_font.mk | ||
shared_library.mk | ||
shared_library_internal.mk | ||
shell_test_config_template.xml | ||
soong_android_app_set.mk | ||
soong_app_prebuilt.mk | ||
soong_cc_prebuilt.mk | ||
soong_config.mk | ||
soong_droiddoc_prebuilt.mk | ||
soong_java_prebuilt.mk | ||
soong_rust_prebuilt.mk | ||
static_java_library.mk | ||
static_library.mk | ||
static_library_internal.mk | ||
suite_host_config.mk | ||
support_libraries.mk | ||
sysprop.mk | ||
target_test_internal.mk | ||
use_lld_setup.mk | ||
verify_uses_libraries.sh | ||
version_defaults.mk | ||
WINPTHREADS_COPYING |