platform_build_soong/zip
Colin Cross 297d9bceda soong_zip: set local header crc and size for symlinks
Getting a crc and size into the local header requires setting it
before writing the payload, or using a streaming data header after
the payload with the crc and size.  Stored (uncompressed) entries
are not allowed to use a streaming data header.

Symlinks are always stored uncompressed, so set the crc and size
in the file header before writing the payload.

Also set the mode to 0777 to match the behavior of zip.

This relands I66c5d41f0a5b23b828d6a03a3790afedc5a97625 with fixes
for the size and mode.

Test: m checkbuild
Test: zipdetails on zip with symlink created with soong_zip has same
      crc in local header and central header.
Test: Compare zipdetails output of zip containing symlink created
      by soong_zip and by zip --symlinks -X.
Bug: 110716403
Change-Id: Iec0bc9056a0d9cdab76f015844aca9c711e72e5b
2018-06-22 23:16:16 -07:00
..
cmd Add Respfile support for soong_zip. 2018-02-13 15:13:01 -08:00
Android.bp Add Respfile support for soong_zip. 2018-02-13 15:13:01 -08:00
rate_limit.go split soong_zip into a library and a binary 2017-10-19 18:18:04 +00:00
zip.go soong_zip: set local header crc and size for symlinks 2018-06-22 23:16:16 -07:00
zip_test.go Add Respfile support for soong_zip. 2018-02-13 15:13:01 -08:00