Merge changes from topic "revert-2952265-revert-2925209-KVPWEBRQHT-BBCOVJBOVF" into main

* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
This commit is contained in:
Colin Cross
2024-02-12 19:31:00 +00:00
committed by Gerrit Code Review
6 changed files with 106 additions and 174 deletions

View File

@@ -1499,18 +1499,18 @@ func (c *deviceConfig) PgoAdditionalProfileDirs() []string {
}
// AfdoProfile returns fully qualified path associated to the given module name
func (c *deviceConfig) AfdoProfile(name string) (*string, error) {
func (c *deviceConfig) AfdoProfile(name string) (string, error) {
for _, afdoProfile := range c.config.productVariables.AfdoProfiles {
split := strings.Split(afdoProfile, ":")
if len(split) != 3 {
return nil, fmt.Errorf("AFDO_PROFILES has invalid value: %s. "+
return "", fmt.Errorf("AFDO_PROFILES has invalid value: %s. "+
"The expected format is <module>:<fully-qualified-path-to-fdo_profile>", afdoProfile)
}
if split[0] == name {
return proptools.StringPtr(strings.Join([]string{split[1], split[2]}, ":")), nil
return strings.Join([]string{split[1], split[2]}, ":"), nil
}
}
return nil, nil
return "", nil
}
func (c *deviceConfig) VendorSepolicyDirs() []string {