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
diff --git a/compliance/notice.go b/compliance/notice.go
index 4fc83ab..edd1b34 100644
--- a/compliance/notice.go
+++ b/compliance/notice.go
@@ -18,6 +18,7 @@
"path/filepath"
"android/soong/android"
+
"github.com/google/blueprint"
)
@@ -62,8 +63,7 @@
props noticeXmlProperties
- outputFile android.OutputPath
- installPath android.InstallPath
+ outputFile android.OutputPath
}
type noticeXmlProperties struct {
@@ -86,10 +86,8 @@
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 {