Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70324819 authored by Cole Faust's avatar Cole Faust Committed by Gerrit Code Review
Browse files

Merge "Keep replace_instead_of_append in arch prop structs" into main

parents 0c07d465 5fda87b8
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -975,12 +975,18 @@ func filterArchStruct(field reflect.StructField, prefix string) (bool, reflect.S
			panic(fmt.Errorf("unexpected tag format %q", field.Tag))
		}
		// these tags don't need to be present in the runtime generated struct type.
		values = RemoveListFromList(values, []string{"arch_variant", "variant_prepend", "path", "replace_instead_of_append"})
		// However replace_instead_of_append does, because it's read by the blueprint
		// property extending util functions, which can operate on these generated arch
		// property structs.
		values = RemoveListFromList(values, []string{"arch_variant", "variant_prepend", "path"})
		if len(values) > 0 {
			if values[0] != "replace_instead_of_append" || len(values) > 1 {
				panic(fmt.Errorf("unknown tags %q in field %q", values, prefix+field.Name))
			}

			field.Tag = `android:"replace_instead_of_append"`
		} else {
			field.Tag = ``
		}
		return true, field
	}
	return false, field