• Samuel Huang's avatar
    [SuperSize] Basic refactoring to archive with multiple containers. · aec22778
    Samuel Huang authored
    To accommodate .aab files and TriChrome, we'd like SuperSize to handle
    multiple "containers" and store data in a single .size file.
    
    This CL performs refactoring archive.py to prepare for extending
    SuperSize for multiple containers. Details:
    * Move temp-file extraction logic with |args.minimal_apks_file| depper,
      into _DeduceMainPaths().
      * Remove |args.extracted_minimal_apk_path|.
    * CreateSizeInfo():
      * Change params to take lists of
        {metadata, section_sizes, raw_symbols}.
      * Implementation TODO; keep old behavior by simply using the first
        element of the above.
    * _DeduceMainPaths():
      * Change to a generator that yield multiple param sets, one for each
        container.
      * Resolve |apk_prefix| and |apk_path| as separate concepts.
      * Move most of the logic to _Inner() function.
      * Split out _DeduceAuxPaths().
    * Run():
      * Merge with _RunInternal().
      * Main action changes:
        * Visits param sets generated from _DeduceMainPaths().
        * Potentially create multiple
          {metadata, section_sizes, raw_symbols},
          now stored into |*_list| variables.
    
    Bug: 900259, 1040645
    Change-Id: Ib158f3d5c8b11567f09826fd0c0b31729f4e065c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2125388Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#754466}
    aec22778
archive.py 77.1 KB