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

Commit 756bd68c authored by LaMont Jones's avatar LaMont Jones
Browse files

Limit release config inheritance from aliases

If the release config has a name matching build prefixes, it may not
inherit from an alias.

Bug: 340208722
Bug: 328495189
Test: manual
Change-Id: Idb7b1fa372db980c5732b700663553b7a9bf4a36
parent 6e1a3815
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -162,6 +162,9 @@ func (config *ReleaseConfig) GenerateReleaseConfig(configs *ReleaseConfigs) erro
		if _, ok := myInheritsSet[inherit]; ok {
			continue
		}
		if isBuildPrefix && configs.Aliases[inherit] != nil {
			return fmt.Errorf("%s cannot inherit from alias %s", config.Name, inherit)
		}
		myInherits = append(myInherits, inherit)
		myInheritsSet[inherit] = true
		iConfig, err := configs.GetReleaseConfig(inherit)