Remove apex.apex_name

apex_name was used to install symbol files under /apex/<apex name>,
which caused duplicate rules when there's two apexes with the same
apex_name. (e.g. override_apex or multi-install apexes)

Since symbol files can be looked up via ELF Build-Id, we don't have to
install symbol files with the actual "apex name", but instead we can
install them with soong module name.

Bug: 267581665
Test: m (soong test)
Change-Id: I1cbe5c86d287f180c7deef93ba85ea5552680011
This commit is contained in:
Jooyung Han
2023-02-08 09:24:06 +09:00
parent d7d179a0e8
commit df26332d50
4 changed files with 21 additions and 71 deletions

View File

@@ -94,10 +94,6 @@ type apexBundleProperties struct {
// a default one is automatically generated.
AndroidManifest *string `android:"path"`
// Canonical name of this APEX bundle. Used to determine the path to the activated APEX on
// device (/apex/<apex_name>). If unspecified, follows the name property.
Apex_name *string
// Determines the file contexts file for setting the security contexts to files in this APEX
// bundle. For platform APEXes, this should points to a file under /system/sepolicy Default:
// /system/sepolicy/apex/<module_name>_file_contexts.
@@ -1037,7 +1033,7 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) {
// This is the main part of this mutator. Mark the collected dependencies that they need to
// be built for this apexBundle.
apexVariationName := proptools.StringDefault(a.properties.Apex_name, mctx.ModuleName()) // could be com.android.foo
apexVariationName := mctx.ModuleName() // could be com.android.foo
a.properties.ApexVariationName = apexVariationName
apexInfo := android.ApexInfo{
ApexVariationName: apexVariationName,