Commit graph

7 commits

Author SHA1 Message Date
Zi Wang
6a66e3d01e Support multiple filters in zipsync
Also applied this feature to kotlinc since it needs both java and kt files.

Test: local test and presubmits

Bug: 287071909
Change-Id: I28c725b03115aef47055448cb75412980015da15
2023-06-14 06:44:49 +00:00
Jiyong Park
dc48afd3c5 zipsync handles symlink
This change fixes a bug that zipsync didn't handle symlink correctly;
symlink was extracted as a regular file whose content is the target
path. Fixing the problem by correctly creating the symlink using
os.Symlink.

Bug: N/A
Test: manual

Change-Id: Ib6685c14e1950d1057d89672883cdd9e4879069a
2020-11-19 08:58:02 +09:00
Jaewoong Jung
a86983dc7a Use 0777 instead of FileInfo() for dirs.
Golang's FileInfo() implementation recognizes FAT filesystem directories
correctly, but doesn't actually add executable bits, which essentially
makes them inaccessible. Use 0777 when we know we're dealing with
directories.

(This is a cherry-pick change.)

Fixes: 153207404
Test: manually tested with an aar file with FAT permission bits.
Change-Id: Ie9f5320bc44d24b2f9d54d4036bb1747456655bb
Merged-In: Ie9f5320bc44d24b2f9d54d4036bb1747456655bb
2020-04-06 10:41:40 -07:00
Dan Willemsen
304cfec778 Refactor .aar resource compilation
Instead of extracting the aar, and passing the res directory to another rule
(along with a dependency to a different known file), don't keep the
extracted res directory, and pass the aar directly to the resource
compliation rule, which will extract just the res directory.

I need this for my RBE experiments, where non-listed output files won't
exist in other rules.

Test: m
Change-Id: I99074381052cbcebb6a402484abae9ab2e40284f
2019-05-29 16:54:43 -07:00
Colin Cross
f46e37f5f7 Fix format string issues
Fix issues caught by go vet.

Test: m checkbuild
Change-Id: Ib8d740457c15432dabe1575a6707726ddaf93084
2018-03-28 15:54:52 -07:00
Colin Cross
628d55d7ef Make zipsync list file output empty if there are no files
The make javac rule uses [ -s srcjar-list ] to decide whether or
not to run javac.  zipsync was putting a trailing "\n" in the
list file, so the file was never empty.  There was one case of a
package that contained no source files (so java-source-list was
empty) and had a res directory with an xml file that declared no
resources (so aapt.jar was created but empty).  The 1-byte
srcjar-list file caused javac to run and error with:
javac: no source files

Test: m checkbuild
Change-Id: I26b394b66bf81e4f5abbd27e4dc06bee1d9420a8
2018-03-22 13:02:39 -07:00
Colin Cross
436b76564d Replace extract-srcjars.sh with zipsync tool
extract_srcjars.sh uses zipinfo and unzip, which fail with an
error on an empty zip file.  Instead of trying to hack around
this (which is hard to make guarantees for since they are
non-hermetic host tools), replace them with a go tool to unzip
a set of zip files into a directory.

Bug: 73885582
Test: m checkbuild
Change-Id: I151fed347ed5196726e36866ffc27bc831799afb
2018-03-15 16:42:43 -07:00