From 8e2a6b1fe9ba77cccd91ccfa39c89853cbaaef86 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 14 May 2024 09:21:10 -0700 Subject: [PATCH] clean up RELEASE_ACONFIG_VALUE_SETS Only add a repository to the trace when it actually specifies aconfig_value_sets. Also default to only generating the release config .mk file for the current TARGET_RELEASE (rather than all), to reduce kati reruns. Bug: 340126861 Test: manual, TH Change-Id: I671d4b5f57c9bdd252d98e048f16aa9c7b3b2ffa --- cmd/release_config/release_config/main.go | 2 +- cmd/release_config/release_config_lib/release_config.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/release_config/release_config/main.go b/cmd/release_config/release_config/main.go index 54328068a..a41183f97 100644 --- a/cmd/release_config/release_config/main.go +++ b/cmd/release_config/release_config/main.go @@ -51,7 +51,7 @@ func main() { flag.BoolVar(&textproto, "textproto", true, "write artifacts as text protobuf") flag.BoolVar(&json, "json", true, "write artifacts as json") flag.BoolVar(&pb, "pb", true, "write artifacts as binary protobuf") - flag.BoolVar(&allMake, "all_make", true, "write makefiles for all release configs") + flag.BoolVar(&allMake, "all_make", false, "write makefiles for all release configs") flag.BoolVar(&useBuildVar, "use_get_build_var", false, "use get_build_var PRODUCT_RELEASE_CONFIG_MAPS") flag.BoolVar(&guard, "guard", true, "whether to guard with RELEASE_BUILD_FLAGS_IN_PROTOBUF") diff --git a/cmd/release_config/release_config_lib/release_config.go b/cmd/release_config/release_config_lib/release_config.go index 820482239..93410a616 100644 --- a/cmd/release_config/release_config_lib/release_config.go +++ b/cmd/release_config/release_config_lib/release_config.go @@ -91,7 +91,8 @@ func (config *ReleaseConfig) InheritConfig(iConfig *ReleaseConfig) error { return fmt.Errorf("Could not inherit flag %s from %s", name, iConfig.Name) } if name == "RELEASE_ACONFIG_VALUE_SETS" { - if len(fa.Traces) > 0 { + // If there is a value assigned, add the trace. + if len(fa.Value.GetStringValue()) > 0 { myFa.Traces = append(myFa.Traces, fa.Traces...) myFa.Value = &rc_proto.Value{Val: &rc_proto.Value_StringValue{ myFa.Value.GetStringValue() + " " + fa.Value.GetStringValue()}}