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

Commit d94cccc5 authored by Cole Faust's avatar Cole Faust
Browse files

Qualify prebuilt_etc apex module name by relative paths

Currently, you can't have two prebuilt_etcs in one apex with the same
file name, because apexes emit make modules for all the files in the
apex, and the module name for the prebuilt_etc's make representation
is based on the base filename of the installed file. We can change it to
be qualified based on the full relative path of the outputfile so that
you don't hit the conflicts as much.

Bug: 340207931
Test: Presubmits
Change-Id: I6708d89c755c31c17cce112fb08a810e51926c76
parent 635e1218
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1636,7 +1636,7 @@ func apexFileForShBinary(ctx android.BaseModuleContext, sh *sh.ShBinary) apexFil

func apexFileForPrebuiltEtc(ctx android.BaseModuleContext, prebuilt prebuilt_etc.PrebuiltEtcModule, outputFile android.Path) apexFile {
	dirInApex := filepath.Join(prebuilt.BaseDir(), prebuilt.SubDir())
	return newApexFile(ctx, outputFile, outputFile.Base(), dirInApex, etc, prebuilt)
	return newApexFile(ctx, outputFile, strings.ReplaceAll(outputFile.Rel(), "/", "_"), dirInApex, etc, prebuilt)
}

func apexFileForCompatConfig(ctx android.BaseModuleContext, config java.PlatformCompatConfigIntf, depName string) apexFile {