diff options
author | 2022-03-31 17:25:20 -0700 | |
---|---|---|
committer | 2022-03-31 17:30:35 -0700 | |
commit | 670c587c09ae68e72077f5bca70e71feebc523cb (patch) | |
tree | cf560ec4c97cc9abd3a0c0e04a0b79034cb17d22 | |
parent | bcabb923dcc3748a015204a9684e9b2135d612e3 (diff) |
Fix inheritance order
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
-rw-r--r-- | core/product_config.rbc | 4 | ||||
-rw-r--r-- | tests/single_value_inheritance/product.rbc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/product_config.rbc b/core/product_config.rbc index 0e7dbf186d..192e40916d 100644 --- a/core/product_config.rbc +++ b/core/product_config.rbc @@ -167,8 +167,8 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init): # Now we know everything about this PCM, record it in 'configs'. children = handle.inherited_modules if _options.trace_modules: - print("# ", " ".join(children.keys())) - configs[name] = (pcm, handle.cfg, children.keys(), False) + print("# ", " ".join(sorted(children.keys()))) + configs[name] = (pcm, handle.cfg, sorted(children.keys()), False) pcm_count = pcm_count + 1 if len(children) == 0: diff --git a/tests/single_value_inheritance/product.rbc b/tests/single_value_inheritance/product.rbc index 332704351f..d090af61e3 100644 --- a/tests/single_value_inheritance/product.rbc +++ b/tests/single_value_inheritance/product.rbc @@ -18,7 +18,7 @@ load(":inherit2.rbc", _inherit2_init = "init") def init(g, handle): cfg = rblf.cfg(handle) - rblf.inherit(handle, "test/inherit1", _inherit1_init) rblf.inherit(handle, "test/inherit2", _inherit2_init) + rblf.inherit(handle, "test/inherit1", _inherit1_init) cfg["PRODUCT_DEFAULT_DEV_CERTIFICATE"] = "" |