#!/usr/bin/env python # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Updates the Fuchsia SDK to the given revision. Should be used in a 'hooks_os'
entry so that it only runs when .gclient's target_os includes 'fuchsia'."""
import argparse import itertools import logging import os import re import shutil import subprocess import sys import tarfile
from common import GetHostOsFromPlatform, GetHostArchFromPlatform, \
DIR_SOURCE_ROOT, IMAGES_ROOT from update_sdk import DownloadAndUnpackFromCloudStorage, \
GetOverrideCloudStorageBucket, GetSdkHash, \
MakeCleanDirectory, SDK_SIGNATURE_FILE
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v',
action='store_true',
help='Enable debug-level logging.')
parser.add_argument( '--boot-images',
type=str,
required=True,
help='List of boot images to download, represented as a comma separated ' 'list. Wildcards are allowed. ')
parser.add_argument( '--default-bucket',
type=str,
default='fuchsia',
help='The Google Cloud Storage bucket in which the Fuchsia images are ' 'stored. Entry in sdk-bucket.txt will override this flag.')
parser.add_argument( '--image-root-dir',
default=IMAGES_ROOT,
help='Specify the root directory of the downloaded images. Optional')
args = parser.parse_args()
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
# If no boot images need to be downloaded, exit. ifnot args.boot_images: return 0
# Check whether there's SDK support for this platform.
GetHostOsFromPlatform()
# Use the bucket in sdk-bucket.txt if an entry exists. # Otherwise use the default bucket.
bucket = GetOverrideCloudStorageBucket() or args.default_bucket
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.