Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client / build / download_toolchains.py
index 4e9ac1b..a44f1b1 100755 (executable)
@@ -128,14 +128,6 @@ def FlavorOutDir(options, flavor):
         flavor)
 
 
-def OldFlavorOutDir(options, flavor):
-  """Given a flavor, returns old flavor directory (transitional)."""
-  if isinstance(flavor, tuple):
-    return os.path.join(options.toolchain_dir, flavor[0])
-  else:
-    return os.path.join(options.toolchain_dir, flavor)
-
-
 def FlavorName(flavor):
   """Given a flavor, get a string name for it."""
   if isinstance(flavor, tuple):
@@ -213,6 +205,10 @@ def SyncFlavor(flavor, urls, dst, hashes, min_time, keep=False, force=False,
     dst: destination directory for the toolchain.
     hashes: expected hashes of the toolchain.
   """
+  if isinstance(flavor, tuple):
+    flavor_name = flavor[0]
+  else:
+    flavor_name = flavor
 
   toolchain_dir = os.path.join(PARENT_DIR, 'toolchain')
   if not os.path.exists(toolchain_dir):
@@ -271,6 +267,11 @@ def SyncFlavor(flavor, urls, dst, hashes, min_time, keep=False, force=False,
   untar_dir = tempfile.mkdtemp(
       suffix=suffix, prefix=prefix, dir=toolchain_dir)
   try:
+    if verbose:
+      tar_file = os.path.basename(filepath)
+      rel_dest = os.path.relpath(dst, toolchain_dir)
+      print '%s: Extracting "%s" -> "%s"...' % (flavor_name, tar_file, rel_dest)
+
     for filepath in filepaths:
       tar = cygtar.CygTar(filepath, 'r:*', verbose=verbose)
       curdir = os.getcwd()
@@ -420,7 +421,6 @@ def main(args):
     version = VersionSelect(versions, flavor)
     urls = FlavorUrls(options, versions, flavor)
     dst = FlavorOutDir(options, flavor)
-    old_dst = OldFlavorOutDir(options, flavor)
     hashes = FlavorHashes(versions, flavor)
     flavor_name = FlavorName(flavor)
 
@@ -431,11 +431,6 @@ def main(args):
       force = False
 
     try:
-      # While we are still transitioning to the new toolchain directory format,
-      # keep on syncing to the old destination. Eventually we will remove this.
-      SyncFlavor(flavor, urls, old_dst, hashes, script_time, force=force,
-                 keep=options.keep, verbose=options.verbose)
-
       if SyncFlavor(flavor, urls, dst, hashes, script_time, force=force,
                     keep=options.keep, verbose=options.verbose):
         print flavor_name + ': updated to version ' + version + '.'