[fuchsia] Update the local-sdk.py script.

Building the SDK now requires two different targets and archives to
untar.

Change-Id: I92d82f2616afad0723eab66d54bc9de279358bcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1583181
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653869}
diff --git a/tools/fuchsia/local-sdk.py b/tools/fuchsia/local-sdk.py
index 3ad6db9..94fdb8c 100755
--- a/tools/fuchsia/local-sdk.py
+++ b/tools/fuchsia/local-sdk.py
@@ -36,7 +36,7 @@
   Run('scripts/fx', '--dir', build_dir, 'set', 'sdk_image.' + arch,
       '--with=//topaz/packages/sdk:topaz', '--args=is_debug=false',
       '--args=build_sdk_archives=true')
-  Run('scripts/fx', 'build', 'topaz/public/sdk:topaz')
+  Run('scripts/fx', 'build', 'topaz/public/sdk:topaz', 'sdk:images_archive')
 
 
 def main(args):
@@ -60,8 +60,12 @@
   BuildForArch(arch)
 
   tempdir = tempfile.mkdtemp()
-  sdk_tar = os.path.join(fuchsia_root, 'out', 'release-' + arch, 'sdk',
-                         'archive', 'topaz.tar.gz')
+  sdk_tars = [
+      os.path.join(fuchsia_root, 'out', 'release-' + arch, 'sdk', 'archive',
+                   'images.tar.gz'),
+      os.path.join(fuchsia_root, 'out', 'release-' + arch, 'sdk', 'archive',
+                   'topaz.tar.gz')
+  ]
 
   # Nuke the SDK from DEPS, put our just-built one there, and set a fake .hash
   # file. This means that on next gclient runhooks, we'll restore to the
@@ -69,7 +73,8 @@
   output_dir = os.path.join(REPOSITORY_ROOT, 'third_party', 'fuchsia-sdk',
                             'sdk')
   EnsureEmptyDir(output_dir)
-  tarfile.open(sdk_tar, mode='r:gz').extractall(path=output_dir)
+  for sdk_tar in sdk_tars:
+    tarfile.open(sdk_tar, mode='r:gz').extractall(path=output_dir)
 
   print 'Hashing sysroot...'
   # Hash the sysroot to catch updates to the headers, but don't hash the whole