Commit 7ebf794e authored by Kevin Marshall's avatar Kevin Marshall Committed by Commit Bot

[Fuchsia] Use the "new_parts" section from the SDK manifest.

Update logic in gen_build_defs.py to match the SDK manifest data format
transition.

Bug: 951021
Change-Id: Ifaf5599e5cdecc9b32a6e285f3ca8ba36e9c48f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562759Reviewed-by: default avatarFabrice de Gans-Riberi <fdegans@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649728}
parent 8acaf3b1
......@@ -187,12 +187,10 @@ def ConvertSdkManifests():
with open(build_output_path, 'w') as buildfile:
buildfile.write(_GENERATED_PREAMBLE)
for next_part in toplevel_meta['parts']:
parsed = json.load(open(os.path.join(sdk_base_dir, next_part)))
if 'type' not in parsed:
raise Exception("Couldn't find 'type' node in %s." % next_part)
for part in toplevel_meta['new_parts']:
parsed = json.load(open(os.path.join(sdk_base_dir, part['meta'])))
convert_function = _CONVERSION_FUNCTION_MAP.get(parsed['type'])
convert_function = _CONVERSION_FUNCTION_MAP.get(part['type'])
if convert_function is None:
raise Exception('Unexpected SDK artifact type %s in %s.' %
(parsed['type'], next_part))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment