Commit cbff54b4 authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Fail to repackage if win_sdk\Debuggers doesn't exist.

This is easy to miss and a toolchain package without win_sdk\Debuggers
will not work as expected so this CL adds a check to stop the
packaging/repacking process as soon as possible.

Bug: 1006238
Change-Id: I272fbaf3e1cbde48a3e260e38e34ffc10d6c86df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1829272
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: 's avatarBruce Dawson <brucedawson@chromium.org>
parent f656f57a
......@@ -79,6 +79,12 @@ def BuildRepackageFileList(src_dir):
# Strip off a trailing slash if present
if src_dir.endswith('\\'):
src_dir = src_dir[:-1]
# Ensure .\win_sdk\Debuggers exists and fail to repackage if it doesn't.
debuggers_path = os.path.join(src_dir, 'win_sdk', 'Debuggers')
if not os.path.exists(debuggers_path):
raise Exception('Repacking failed. Missing %s.' % (debuggers_path))
result = []
for root, _, files in os.walk(src_dir):
for f in files:
......@@ -166,6 +172,10 @@ def BuildFileList(override_dir, include_arm):
result.append((final_from, dest))
sdk_path = r'C:\Program Files (x86)\Windows Kits\10'
debuggers_path = os.path.join(sdk_path, 'Debuggers')
if not os.path.exists(debuggers_path):
raise Exception('Packaging failed. Missing %s.' % (debuggers_path))
for root, _, files in os.walk(sdk_path):
for f in files:
combined = os.path.normpath(os.path.join(root, f))
......
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