When an intermediate product is evaluated, it needs to
act as if it's the only product being evaulated. However,
currently, if it inherited a makefile that was also being
inherited by the overall top level product via a different
path, it would not get the values from that makefile.
Copy the configs dictionary before evaluating each product
that needs artifact path requirements, and create seperate
postfix orders for all of them that don't contain any products
that they don't inherit from.
Bug: 221312707
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I235ad78d587a2e315ba446b5e126d8f6d0fbbea7
List variables needed to be percolated in the order of inherit() calls.
children.keys() was in that order, due to starlark dictionaries being
iterable in the order of insertion, but the previous cl broke that
behavior by sorting them. Instead, only sort the children for
single value variables.
Fixes: 226206409
Fixes: 228044099
Test: ./out/rbcrun ./build/make/tests/run.rbc and testing aosp_arm64
Change-Id: I5b91514e87b158b615e4d4ec7868fccb0248379b
This reverts commit 670c587c09.
Reason for revert: Breaks RBC product config for more products than it fixes: b/228044099
Change-Id: I614663311f67b3631a0cee427453c550fc426c8b
The children to inherit from were not sorted. This
wasn't a problem for list variables, because all those
inheritances get merged together based on the @inherit/
values in the list variables. But for single value variables
it made a difference.
Bug: 226206409
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: Ib56bbb91a79fe8c7cb780c253f5bd8d6c0e87765
Single-value product variables resolve to the first
instance of that variable in prefix order. What we
have right now is taking the value from the current
makefile if it's set, but if it's not, we take it
from the last child, not the first.
Fixes: 226206409
Test: Manually
Change-Id: Id23f7c269ff9a352bf0b67cb57156b72449f978e