Always package NOTICE.xml.gz

To remove the reliance on UseSoongSystemImage. We can always package
it, but not install it, so that it appears for soong built filesystems
but doesn't conflict with the make built version.

Test: m out/soong/.intermediates/build/make/target/product/generic/generic_system_image/android_common/fileList, verified that NOTICE.xml.gz was still there
Change-Id: I76d97a380b8c295f6d1cd8ea1c809229867ab890
This commit is contained in:
Cole Faust 2024-11-07 17:56:21 -08:00
parent 3d2c75dc6a
commit 2598bb9670

View file

@ -18,6 +18,7 @@ import (
"path/filepath"
"android/soong/android"
"github.com/google/blueprint"
)
@ -62,8 +63,7 @@ type NoticeXmlModule struct {
props noticeXmlProperties
outputFile android.OutputPath
installPath android.InstallPath
outputFile android.OutputPath
}
type noticeXmlProperties struct {
@ -86,10 +86,8 @@ func (nx *NoticeXmlModule) GenerateAndroidBuildActions(ctx android.ModuleContext
nx.outputFile = output.OutputPath
if android.Bool(ctx.Config().ProductVariables().UseSoongSystemImage) {
nx.installPath = android.PathForModuleInPartitionInstall(ctx, nx.props.Partition_name, "etc")
ctx.InstallFile(nx.installPath, "NOTICE.xml.gz", nx.outputFile)
}
installPath := android.PathForModuleInPartitionInstall(ctx, nx.props.Partition_name, "etc")
ctx.PackageFile(installPath, "NOTICE.xml.gz", nx.outputFile)
}
func (nx *NoticeXmlModule) AndroidMkEntries() []android.AndroidMkEntries {