Set build_logtags true for system partition
This enables etc/event-log-tag file to be installed for the soong
generated system partition.
This change also introduces `partitionSpecificFilesystemProps` to
improve readability.
Test: run diff test and observe etc/event-log-tag is removed from the diff
Bug: 374132914
Change-Id: Id4a084431ccb4644e3ac6c9248c7993d1a75158f
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 89db166..96dda04 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -331,10 +331,18 @@
ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps)
}
-var (
- // https://source.corp.google.com/h/googleplex-android/platform/build/+/639d79f5012a6542ab1f733b0697db45761ab0f3:core/packaging/flags.mk;l=21;drc=5ba8a8b77507f93aa48cc61c5ba3f31a4d0cbf37;bpv=1;bpt=0
- partitionsWithAconfig = []string{"system", "product", "vendor"}
-)
+func partitionSpecificFsProps(fsProps *filesystem.FilesystemProperties, partitionType string) {
+ switch partitionType {
+ case "system":
+ fsProps.Build_logtags = proptools.BoolPtr(true)
+ // https://source.corp.google.com/h/googleplex-android/platform/build//639d79f5012a6542ab1f733b0697db45761ab0f3:core/packaging/flags.mk;l=21;drc=5ba8a8b77507f93aa48cc61c5ba3f31a4d0cbf37;bpv=1;bpt=0
+ fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true)
+ case "product":
+ fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true)
+ case "vendor":
+ fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true)
+ }
+}
// Creates a soong module to build the given partition. Returns false if we can't support building
// it.
@@ -381,8 +389,6 @@
fsProps.Base_dir = proptools.StringPtr(partitionType)
- fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(android.InList(partitionType, partitionsWithAconfig))
-
fsProps.Is_auto_generated = proptools.BoolPtr(true)
// Identical to that of the generic_system_image
@@ -396,6 +402,8 @@
"framework/oat/*/*", // framework/oat/{arch}
}
+ partitionSpecificFsProps(fsProps, partitionType)
+
// system_image properties that are not set:
// - filesystemProperties.Avb_hash_algorithm
// - filesystemProperties.File_contexts