예제 #1
0
def make_lightweight_archive(file_archive, archive_name, files_to_archive,
                             context, staging_dir, ignore_sub_folder):
  """Repackages and strips the archive.

  Repacakges and strips according to CHROME_REQUIRED_FILES and
  CHROME_STRIP_LIST.
  """
  strip_list = CHROME_STRIP_LIST.get(context.archive)
  tmp_archive = os.path.join(staging_dir, 'tmp_%s' % archive_name)
  (zip_dir, zip_file) = bisect_repackage_utils.MakeZip(
      tmp_archive, archive_name, files_to_archive, file_archive,
      dir_in_zip=context.GetExtractedDir(),
      raise_error=False, strip_files=strip_list,
      ignore_sub_folder=ignore_sub_folder)
  return (zip_dir, zip_file, tmp_archive)
예제 #2
0
def make_lightweight_archive(file_archive, archive_name, files_to_archive,
                             context, staging_dir):
    """Repackages and strips the archive.

  Repacakges and strips according to CHROME_REQUIRED_FILES and
  CHROME_STRIP_LIST.
  """
    strip_list = CHROME_STRIP_LIST[context.archive]
    tmp_archive = os.path.join(staging_dir, 'tmp_%s' % archive_name)
    (zip_file,
     zip_dir) = bisect_repackage_utils.MakeZip(tmp_archive,
                                               archive_name,
                                               files_to_archive,
                                               file_archive,
                                               raise_error=False,
                                               strip_files=strip_list)
    return (zip_file, zip_dir, tmp_archive)